|
|
 |
BOOK: Beginning VB.NET Databases  | This is the forum to discuss the Wrox book Beginning VB.NET Databases by Thearon Willis; ISBN: 9780764568008 |
|
Welcome to the p2p.wrox.com Forums.
You are currently viewing the BOOK: Beginning VB.NET Databases section of the Wrox p2p Programmer to Programmer discussion community. This is a community of more than 40,000 computer programmers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining our free Wrox p2p community you can post your own programming questions and respond to other programmers’ questions. Registered users also don't have to see the ads that are displayed to guests. Registration is fast, simple and absolutely free so please, join today!
Join today and post to win prizes! Post more to increase your chances of being Wrox’s top poster of the month.
|
 |
|

January 30th, 2009, 11:32 PM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 19
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
VB.NET 2003 Appendix B convert to VB 2008 Express Edition
Hi,
This is my first post. I am an old VB6.0 guy. I bought the wrox book and starting reading and it has been great. I am typing in all the code for the Time Tracker Project. This has been a great help for getting the rust off. But, somethings in the example are not in VB 2008 ee. One, there is a need for a Main () procedure. It is done differently in VB 2008. Two, I can not seem to add a app.config file for my custom settings to match the Appendix B code. Is VB 2008 ee different? If so will I be able to work out all the differences and make the Appendix B example work ? If some one could give me a tip or to I would greatly appreciate it THANKS IN ADVANCE
|

January 31st, 2009, 10:32 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 381
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
Using VB 2008, Double click on My Project in the Solution Explorer. When the property page displays, click on the Application tab and then uncheck the Enable application framework checkbox. Sub Main will now be available in the Startup Object combobox.
For the App.Config part, just click on the Settings tab in the property pages and then add your settings there.
Thearon
|
|
The Following User Says Thank You to Thearon For This Useful Post:
|
|

February 2nd, 2009, 12:18 AM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 19
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
NO Application Configuration ICON in VB2008 ee
I need to create a app.config file in VB 2008 ee. I realize that if I double click my project select settings tab. From here I do not know how I can generate a app.config file for my project that I can save and see in my project and edit it and make changes to it. This part of the Time Tracker project that I am trying to follow along with. Can someone please help THANKS
|

February 2nd, 2009, 07:36 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 381
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
The Settings tab in the property pages automatically creates the app.config file for you. VS 2008 now puts this in for you automatically.
Thearon
|
|
The Following User Says Thank You to Thearon For This Useful Post:
|
|

February 2nd, 2009, 12:48 PM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 19
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
App.Config File VB 2008
Great,
I was able to generate the app.config file. I did notice however that the book ex(add key is replaced by setting name) is this the only difference I should be concerned with in this example from the book? BTW, can I remove all of the other sections and settings that are not shown in the example and just keep the appSettings section ? THANKS this is a great learning experience and I will buy Wrox books just because of the examples code and help community.........
|

February 3rd, 2009, 01:01 PM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 381
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
You should not remove any code generated by VS2008 in the app.config file. Just add the settings that were specified in the book as they releate to the code needed in your project.
Thearon
|
|
The Following User Says Thank You to Thearon For This Useful Post:
|
|

February 3rd, 2009, 08:05 PM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 19
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
MISSING VARIABLE DECLARATION STATEMENT
I have three procedures that have the same error indicating that I did not declare a variable ("imgCurrentNavImage") it is in the following Procedures:
(1) Private Sub NavigationPanel_MouseEnter()
(2) Private Sub NavigationPanel_MouseLeave()
(3) Private Sub NavigationPanel_MouseUp()
I followed the code but maybe I missed this can you help...... THANKS
|

February 4th, 2009, 10:04 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 381
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
|

February 4th, 2009, 03:03 PM
|
|
Authorized User
|
|
Join Date: Jan 2009
Posts: 19
Thanks: 4
Thanked 0 Times in 0 Posts
|
|
ERATA WAS ON THE MONEY GREAT HELP
However,
I am now stuck on page 678 step 5 Public Sub New()
There is a line of code that states it is obsolete
objAppSettings = ConfigurationSettings.AppSettings
I am not sure how the Specialized.NameValueCollection works with the App.config file attibutes. Settings = values etc. BTW, the VB2003 example of appconfig file uses Add Key = Value , but 2008 appears to use a settings = value am I correct on this ?
What should I use in place of the "Specialized.NameValueCollection"
and objAppSettings = ConfigurationSettings.AppSettings to make my code work. Is there an article I can read about using these ?
Let me know what to do and if there are any more places like erata that I can search for an answer. THANKS again for the HELP .. 
|

February 5th, 2009, 07:49 AM
|
 |
Wrox Author
|
|
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 381
Thanks: 0
Thanked 6 Times in 6 Posts
|
|
You'll need to rewrite that procedure as follows:
PublicSubNew()
'Build the SQL connection string and initialize the Connection object
Connection = New OleDbConnection( _
"Provider=" & My.Settings.Provider & ";" & _
"Data Source=" & My.Settings.DataSource & ";")
EndSub
Basically you need to use My.Settings and then the settings name that you created in the property pages.
Thearon
|
|
The Following User Says Thank You to Thearon For This Useful Post:
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
 |