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 2nd Edition/Beginning VB.NET 2003
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003
This is the forum to discuss the Wrox book Professional VB.NET 2003 by Bill Evjen, Billy Hollis, Rockford Lhotka, Tim McCarthy, Jonathan Pinnock, Rama Ramachandran, Bill Sheldon; ISBN: 9780764559921
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 11th, 2004, 06:19 AM
Registered User
 
Join Date: Feb 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default problem with binding example (chap 16)

i have try to follow excatly the same coding with the book, 4 binding simple control(pg 647) but i encounter this prob
when i run the program, there is an error

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

Additional information: System error.

the system show the error on this line
myadapter.Fill(myds, "authors")

can somebody tell me why?

  #2 (permalink)  
Old February 12th, 2004, 07:14 PM
Registered User
 
Join Date: Feb 2004
Location: , , .
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I was having this issue for a while as well. It turned out that there was some sort of issue with the connection string (not SelectCommand, but the actual "myConnection's" string).

One thing that helped me find out what it was that was causing the issue was to get the source code for the book off of the Wrox site. I compared the two code samples (which had originally appeared the same to me, looking from screen to book). I noticed a single character that made all the difference. Might try that.

  #3 (permalink)  
Old June 17th, 2004, 01:47 AM
Registered User
 
Join Date: Jun 2004
Location: Karachi, Sindh, Pakistan.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Akuta,

I amd facing the same problem. Can you please specify which single character solved your problem. This is because I do not get binding example from the wrox site. It only contains DataSet Example.

Can you send the code also.

Best Regards

Afzal

  #4 (permalink)  
Old June 21st, 2004, 07:32 PM
Registered User
 
Join Date: Jun 2004
Location: Hamilton, Ontario, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JerxDcs
Default

I am having the same exact problem.. and im looking at the book and the code from the wrox site and they both seem the same to me. plus even when i modify the the connection line to use my sa password the wrox code still doesnt work.

same exact error..

An unhandled exception of type 'System.Data.SqlClient.SqlException' occurred in system.data.dll

Additional information: System error.

Jonathan... you there buddy..??? can you please lend a hand on this one ??

thanks
Jer.

  #5 (permalink)  
Old June 22nd, 2004, 08:46 AM
Authorized User
 
Join Date: Jun 2003
Location: Cowes, IOW, United Kingdom.
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JonathanC
Default

Hi All

When you recieve an error of SqlException it is always likely that there is a more specific error.
Wrap the code in the Form1_Load event with a

Try

'the existing code here
Catch exception As Exception
MessageBox.Show(exception.Message)
End Try

You will notice that a more beneficial message will popup for you.
I suspect that it is likely to be a connection string error.
Could you please verify that your connection string is correct by logging into your SQL database via Analyzer or through the VS.NET Server Explorer.


You can put up the detailed error on the board for me to see.
Then we can try to get it working for you.




Jonathan Crossland
http://www.jonathancrossland.com
  #6 (permalink)  
Old June 22nd, 2004, 03:29 PM
Registered User
 
Join Date: Jun 2004
Location: Hamilton, Ontario, Canada.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to JerxDcs
Default

holy crap Jonathan you are the man.. thank you so much. first i found it was my connection string so i changed it back to what i first had it as

    Dim objconnection As SqlConnection = New _
        SqlConnection("server=NADA;integrated security=SSPI;initial catalog=pubs;")

then i found out it was a simple spelling error on my part that i didnt notice..

thank you so much. great book by the way. this chapter is helping me out so much.

Ciao
Jer.

  #7 (permalink)  
Old July 4th, 2004, 08:36 PM
Registered User
 
Join Date: Jul 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

where can I download this Binding Example code?

  #8 (permalink)  
Old September 12th, 2005, 03:14 PM
Registered User
 
Join Date: Jul 2005
Location: Castries, n/a, Saint Lucia.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I have the same problem with the binding example in Ch 16. When I use try..catch statements to catch the problem. I get the message, Line 1:incorrect syntax near '.'. I think it has something to do with the titles table, but I don't see why, I checked the table in SQLServer and the fields and data is intact.

Any help appreciated.

Cathy
  #9 (permalink)  
Old September 12th, 2005, 03:16 PM
Registered User
 
Join Date: Jul 2005
Location: Castries, n/a, Saint Lucia.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Sorry, forgot to add my SQL statement

Dim myAdapter As SqlDataAdapter = New SqlDataAdapter( _
    "SELECT authors.au_id,au_lname, au_fname " & _
        "titles.title_id, title, price " & _
        "FROM authors " & _
        "JOIN titleauthor ON authors.au_id = titleauthor.au_id" & _
        "JOIN titles on titleauthor.title_id = titles.title_id " & _
        "ORDER BY au_lname, au_fname", myConnection)
 


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
chap 16 Page 631 audreiev BOOK Beginning Linux Programming, 3rd Edition 0 July 7th, 2007 08:40 PM
Chap 16, P. 619: Dump the values into a database cJeffreywang BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 July 1st, 2007 09:26 AM
Codes in LoanSlicer folder of Chap 16 are empty? cJeffreywang BOOK: Professional VB 2005 ISBN: 0-7645-7536-8 0 June 23rd, 2007 02:06 PM
Chap 16 example not working John Cook BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 2 February 10th, 2006 05:40 PM



All times are GMT -4. The time now is 08:24 PM.


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