D
dbuchanan
How do I explicitly cast a string to Byte?
Here are my circumstances;
The string is from a textbox and could be empty.
The Byte is a tinyint in SQL Server 2000
I am using the AddRow method as shown below and get an
InvalidCastException.
"Cast from string "" to type integer is not valid"
Me.DataSet.tblCustomer.AddtblCustomerRow(txtCustomerName.Text.ToString,
CByte(CInt(txtJobType.Text)), )
Here are my circumstances;
The string is from a textbox and could be empty.
The Byte is a tinyint in SQL Server 2000
I am using the AddRow method as shown below and get an
InvalidCastException.
"Cast from string "" to type integer is not valid"
Me.DataSet.tblCustomer.AddtblCustomerRow(txtCustomerName.Text.ToString,
CByte(CInt(txtJobType.Text)), )