Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7
This is the forum to discuss the Wrox book Beginning Microsoft Visual Basic 2008 by Thearon Willis, Bryan Newsome; ISBN: 9780470191347
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Microsoft Visual Basic 2008 ISBN: 978-0-470-19134-7 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 June 16th, 2009, 02:48 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Chapter 16 Accessing Database

Pages: 546 -- 548
I have been trying to connect to my database (MDB Access 2003).

With the execption of it being the NWind database I do all of the steps 1 ... 7 without problems.

In step 7, I test the connection and the dialog box replys in the affirmative.

I do all the "check it out" or test buttons on the IDE wizard.

I saw all my tables in the MDB.

I saw all the rows in the table which I selected, with the propert data bases.

When I select RUN from the debug tool bar the form renders, and the data grid is empty.

The grid responds to adding new data just like a Data Set in Access Proper. But nothing
is added.

In step 12, there is no population of the Data Grid Control. I am at the end of my patience.
I have used ODBC via C and C++ to connect with Access back in the 1990s and Oracal also.

Using the wizards there must be some outrageous oversite on my part, it just doesn't work. The MDB has only one Account 'Admin' with no password. The grid shows the column names but no data.

What have I stepped on??? All my upgrades are current as of (05.17.200)

Reguards Bruce
Reply With Quote
  #2 (permalink)  
Old June 23rd, 2009, 06:41 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

Bruce,

Can you post your code for this? I suspect you may just need to call the Bind method on the grid after you have bound it to the dataset.

Thearon
Reply With Quote
  #3 (permalink)  
Old June 30th, 2009, 12:49 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for just getting back to me!!

I am feeling like the ambassador to the Planet Stupid!

I zipped up the source project @ 1.22 mb

Couldn't find an attachment button on the reply to thread.

The VB code is 80kb in size!

That seems like a very big thread, since, this is my first experience with any kind of fourm group, I am sorta at a loss for the do's and don'ts and the other niceties.

Do you want an 80k thread??

regards Bruce
Reply With Quote
  #4 (permalink)  
Old July 1st, 2009, 12:37 PM
Wrox Author
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2006
Location: , , .
Posts: 91
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Bruce, Can you use Access to update your data? Bryan
Reply With Quote
  #5 (permalink)  
Old July 7th, 2009, 01:46 PM
Registered User
 
Join Date: Jun 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The NW Database was time stampled 1998, I have a 2003 Version MDB and a 2007 accdb file that I have tried this with. Thru access 2007 I have opened and connected to various MDBs, on several occasions converting data from 2003 to 2007.
In VB 2008 while testing the example I saw good data from the wizards "test" buttons. When running the debugger, I can see the column heads with the column names, The navigation transport buttons are greyed out, and the data edit control has no data. It does not seem to be a connection problem as much as what is supposed to happen afterwards.

Again thanks for the response

Regards Bruce
Reply With Quote
  #6 (permalink)  
Old July 7th, 2009, 10:29 PM
Wrox Author
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2006
Location: , , .
Posts: 91
Thanks: 0
Thanked 5 Times in 5 Posts
Default

Do you have this code in form1.vb. It wraps poorly, but this should be in the form load event. There is 1 line of code Me.CustomerQueryTableAdapter.Fill(Me.NorthwindData Set.CustomerQuery)
Code:
 
Public Class Form1
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.CustomerQueryTableAdapter.Fill(Me.NorthwindDataSet.CustomerQuery)
    End Sub
End Class
Bryan
Reply With Quote
  #7 (permalink)  
Old July 8th, 2009, 08:31 AM
Registered User
 
Join Date: Jun 2009
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks,

I regenerated the project. The version of NW had no customer query, so I selected the categories table.

The code emitted from the wizzards was as you stated, with the exception of NW CategoryTable string insead of the Customer Query. With the properties set to false on ADD and DELETE, couldn't find EDIT. Ran with the debugger and got the column headings. Went back to the properties set ADD and DELETE to true. Re-ran. The control would accept data entry, but it wasn't saved in the MDB. Still not happening.

I know that communicating through the fourm protects you guys from the masses. Could you create a temporary mail box so that I may zip up my project and one time email it to you. You have my direct email URL.

regards Bruce
Reply With Quote
  #8 (permalink)  
Old July 12th, 2009, 01:19 PM
Wrox Author
Points: 333, Level: 6
Points: 333, Level: 6 Points: 333, Level: 6 Points: 333, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2006
Location: , , .
Posts: 91
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I sent you an email. Bryan
Reply With Quote
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
Chapter 16 Fig 16-11 krsouthern BOOK: Professional SharePoint 2007 Development ISBN: 978-0-470-11756-9 1 July 8th, 2008 12:11 PM
Chapter 16 czambran BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 3 April 11th, 2005 11:01 AM
chapter 16 ?? farsfar2 BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 11 March 26th, 2005 10:01 PM
Help in Chapter 16 aldwincusi VB.NET 2002/2003 Basics 2 June 4th, 2003 09:52 AM



All times are GMT -4. The time now is 12:49 AM.


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