Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB.NET 1.0 > BOOK: Beginning VB.NET Databases
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2005, 05:26 PM
Registered User
 
Join Date: Jul 2005
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 :)
 
Old July 9th, 2005, 05:43 PM
Registered User
 
Join Date: Jul 2005
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.





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





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