Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How To Use SQLTypes on A WebForm (TextBox Value To SQLString Variable)

Status
Not open for further replies.
Joined
Feb 17, 2004
Messages
3
Location
US
I have been trying to solve this problem for the last three days and have finally decided I need help. Here is the question.

I am using a tool called llblgen which generates a VB.NET Data Access Layer based on the schema in a SQL server database. The tool works fine there problem i am have is this. While creating the properties for the classes the tool uses sqltypes meaning I have a database field called FirstName which is varchar in the database. The proerties is defined as a SQLString type. When I try to assign the value from a text box to this proerty i get invalid cast. No mater what i do i cannot seem to understand how to assign textbox values or listbox values to a variable or a property that has been defined as a sqltype.

My question to you is how do you convert a textbox.text value to sqlstring

Sample Code
Dim x As SqlString
x = "Help Me..." (Code Errors Out Here!!!!)

Error Description
Value Of Type String Can Not Be Convert To SQLString?????
 

Try:
[tt]
Dim x As SqlString
x = new SqlString("Help Me..." )
[/tt]

- B
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top