Dim userid As Int32 = Me.classname.UserID
Dim strSQLD As String = "Insert into table1 (userid) values (" & Me.classname.UserID & ")"
You need to concatenate the value into the string, I beleive VB.Net will implicitly convert UserID to a string, otherwise convert/cast it first.
UserId by the way is a keyword in TSQL so if you have to use it in any MS SQL strings always put [] around it [UserId] so it is evaluated literally by MSSQL's query engine and optimizer.
hollystyles
Veteran Poster
1,182 posts since Feb 2005
Reputation Points: 262
Solved Threads: 68