Wrox Programmer Forums
|
BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5
This is the forum to discuss the Wrox book Beginning Visual Basic 2005 Databases by Thearon Willis; ISBN: 9780764588945
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 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 March 2nd, 2006, 04:55 PM
Authorized User
 
Join Date: Aug 2005
Posts: 88
Thanks: 4
Thanked 0 Times in 0 Posts
Default CType string To Byte

I am working through the Time Tracker application and have just come across what seems to be a problem.

The code in Chapter 7 shows the following line of code in several procedures:

 objData.AddParameter("@SequenceNumber", _
 Data.OleDb.OleDbType.UnsignedTinyInt, 1, _
 CType(txtSequenceNumber.Text, Byte))

When I run the project I get this error:

  Conversion from String "" to 'Byte' is not valid.

The code in my project is exactly like the code in the example and it doesn't run either.

Does anyone have the answer?

 
Old March 2nd, 2006, 09:06 PM
Wrox Technical Editor
 
Join Date: Dec 2005
Posts: 271
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I think this error was discussed previously.
Here's the link: http://p2p.wrox.com/topic.asp?TOPIC_ID=32614

Hope it helps..

- A.Kahtava





Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting a String to a Byte array BrianWren Pro Visual Basic 2005 2 February 20th, 2007 11:03 PM
Byte alignment or byte padding subodh_chettri C++ Programming 0 June 23rd, 2006 10:35 AM
Err: Cast from String "" to type byte is not valid Parbish BOOK: Beginning VB.NET Databases 1 July 9th, 2005 05:43 PM
CType Issues Dave0865 BOOK: ASP.NET Website Programming Problem-Design-Solution 3 March 23rd, 2004 12:50 PM
CType (When is it useful?) LULU VB.NET 9 October 7th, 2003 10:43 PM





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