Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > BOOK: Beginning VB.NET Databases
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 30th, 2009, 11:32 PM
Authorized User
 
Join Date: Jan 2009
Posts: 21
Thanks: 4
Thanked 0 Times in 0 Posts
Question 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
Reply With Quote
  #2 (permalink)  
Old January 31st, 2009, 10:32 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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
Reply With Quote
The Following User Says Thank You to Thearon For This Useful Post:
brucechess (February 3rd, 2009)
  #3 (permalink)  
Old February 2nd, 2009, 12:18 AM
Authorized User
 
Join Date: Jan 2009
Posts: 21
Thanks: 4
Thanked 0 Times in 0 Posts
Default 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
Reply With Quote
  #4 (permalink)  
Old February 2nd, 2009, 07:36 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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
Reply With Quote
The Following User Says Thank You to Thearon For This Useful Post:
brucechess (February 3rd, 2009)
  #5 (permalink)  
Old February 2nd, 2009, 12:48 PM
Authorized User
 
Join Date: Jan 2009
Posts: 21
Thanks: 4
Thanked 0 Times in 0 Posts
Default 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.........
Reply With Quote
  #6 (permalink)  
Old February 3rd, 2009, 01:01 PM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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
Reply With Quote
The Following User Says Thank You to Thearon For This Useful Post:
brucechess (February 3rd, 2009)
  #7 (permalink)  
Old February 3rd, 2009, 08:05 PM
Authorized User
 
Join Date: Jan 2009
Posts: 21
Thanks: 4
Thanked 0 Times in 0 Posts
Question 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
Reply With Quote
  #8 (permalink)  
Old February 4th, 2009, 10:04 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

Please check the erata at http://www.wrox.com/WileyCDA/WroxTit...Cd-ERRATA.html

Thearon
Reply With Quote
  #9 (permalink)  
Old February 4th, 2009, 03:03 PM
Authorized User
 
Join Date: Jan 2009
Posts: 21
Thanks: 4
Thanked 0 Times in 0 Posts
Exclamation 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 ..
Reply With Quote
  #10 (permalink)  
Old February 5th, 2009, 07:49 AM
Thearon's Avatar
Wrox Author
 
Join Date: Dec 2003
Location: Fuquay Varina, NC, USA.
Posts: 396
Thanks: 0
Thanked 8 Times in 8 Posts
Default

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
Reply With Quote
The Following User Says Thank You to Thearon For This Useful Post:
brucechess (February 5th, 2009)
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Visual Web Developer 2008.. Express Edition Neamat .NET Framework 3.5 14 August 3rd, 2008 09:47 AM
Downloading VB 2008 Express Kiddi Visual Basic 2008 Essentials 1 June 11th, 2008 12:29 PM
vb.net 2008 re: VB.NET databases book bigbearjeff VB.NET 0 June 2nd, 2008 01:22 PM
VB Express Edition pkdash BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 2 May 28th, 2008 07:23 AM



All times are GMT -4. The time now is 12:48 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.