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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sqlexception error on executenonquery

Status
Not open for further replies.

basbrian

Programmer
Feb 18, 2002
49
0
0
AU
hi, still trying to figure out vb :). this code was working and then I added an insert trigger on the table in this qyuery. now I get an Sqlexception was unhandled error - subquery returned more than 1 row. how do I fix this???

Thanks
Code:
Dim cninsert As New SqlConnection(connectionString)
Dim sqlinsert As String = "insert coffsdelegation_position (pos_ref, code1, code2, code3,del_code) values ('" & cpos & "', " & c1 & ", " & c2 & ", " & c3 & ", '" & cdel & "')"
                
Dim cmd As New SqlCommand(sqlinsert, cninsert)
Dim i As Integer = 0
cninsert.Open()
i = cmd.ExecuteNonQuery()
 
don't worry about this one, found the problem!

I/O error - idiot operator
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top