Hi,
First of all if you are using VSNet with VBNet than set on Option Strict to
On. Probably because all still upgraders from VB6 to VBNet is this by
default of.
Dim woPrefix as String = "ASHC"
Dim aryWO as Array = Split(txtWO.Text, ",", -1)
SqlSelectCommand1.CommandType = CommandType.Text 'this is default
SqlSelectCommand1.CommandText = "Delete from contractOutWO where ID ='" &
lblID.Text & "'"
SqlSelectCommand1.ExecuteNonQuery()
For i as Integer = 0 To AryWO.length - 1
If ddlCOType.SelectedValue = "E" Or InStr(1, txtWO.Text,
"ASHC") Then
SqlSelectCommand1.CommandText =
SqlSelectCommand1.CommandText + "Insert into
contractOutWO Values('" &
Do not use the ambigous + to concatinate in VB Net. With Option Strict of it
can give you a lot of trouble, it can than be used in the late binding as an
real plus to add.
I cannot see it deeper, because of that long string. The change that this
plus is your error is however high.
If that is not the problem than reply here.
Have as well beside this a look at commandparameters. That this sample is
for windowforms does not matter in this case.
http://www.vb-tips.com/default.aspx?...6-7139b8970071
This is the most simple sample there are more about this on our website just
search for 'parameters'
Did you know by the way that there is a special VB Net language newsgroup.
microsoft.public.dotnet.languages.vb
I hope this helps so far,
Cor