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
Register | FAQ | Members List | Calendar | 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 Display Modes
  #1 (permalink)  
Old July 9th, 2005, 06:26 PM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Err: Cast from String "" to type byte is not valid


I am in Chapter 7. I have entered all from pages 147 to 151. When I try to "add" a record, I get the following message: "Cast from string "" to type byte is not valid". The error occurs when the following code is executed:
objData.AddParameter("@SequenceNumber", OleDb.OleDbType.UnsignedTinyInt, 1, CType(txtSequenceNumber.Text, byte))

I also tried the sample code provided by this site and got the same message. I tried changing the "byte" to "integer" and that did not work (of course it wouldn't, would it? Since Sequence number is set up in Access as byte.)

I am working with VB.net 2003 and Access 2002 on XP Pro. Does anyone have any idea of how to correct this?

Thankx :)
Reply With Quote
  #2 (permalink)  
Old July 9th, 2005, 06:43 PM
Registered User
 
Join Date: Jul 2005
Location: , , .
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nevermind. This was a case of SYS (Stupid User Syndrome). Need to hit the Add button after you populate the fields and not before. Guess I will have to add that message to my version.
Reply With Quote
Reply


Thread Tools
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
Cast from string to type Double not valid mika27 ASP.NET 2.0 Basics 0 January 31st, 2007 05:52 AM
Cast from string "" to type 'Double' is not dounme ADO.NET 1 March 8th, 2005 01:31 PM
Cast from string "" to type 'Double' is not dounme SQL Server 2000 1 February 18th, 2005 01:44 AM
Cast from string "" to type 'Integer' is not valid h3x SQL Server ASP 1 January 30th, 2005 09:35 PM



All times are GMT -4. The time now is 11:51 PM.


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