I need the following code converted to VB to work in a web method I am creating. I had tried a few different things with no success. Hoping someone might be able to help me out. Thanks!
strSQL = "SELECT @@IDENTITY AS recid"
Set rsTemp = ocnComp.Execute(strSQL)
If Not rsTemp.EOF Then
strRecid = Trim(rsTemp("recid"))
i = 0
Do While Len(arrParts(i, 0)) > 0
' Create the INSERT statement for the 'detail' table.
strSQL = "INSERT INTO seqexp_detail (recid, custpart, qty, comment, who, active) " & _
"VALUES (" & strRecid & ", '" & arrParts(i, 0) & "', '" & arrParts(i, 1) & "', '" & arrParts(i, 2) & "', '" & arrParts(i, 3) & "', 1)"
'ocnComp.Execute(strSQL)
i = i + 1
Loop
strSQL = "SELECT @@IDENTITY AS recid"
Set rsTemp = ocnComp.Execute(strSQL)
If Not rsTemp.EOF Then
strRecid = Trim(rsTemp("recid"))
i = 0
Do While Len(arrParts(i, 0)) > 0
' Create the INSERT statement for the 'detail' table.
strSQL = "INSERT INTO seqexp_detail (recid, custpart, qty, comment, who, active) " & _
"VALUES (" & strRecid & ", '" & arrParts(i, 0) & "', '" & arrParts(i, 1) & "', '" & arrParts(i, 2) & "', '" & arrParts(i, 3) & "', 1)"
'ocnComp.Execute(strSQL)
i = i + 1
Loop