First I will show you my sql, just in case it is some obvious syntax error on my part:
"INSERT INTO tblResults(status, enthusiasm, communication, knowledge, interaction,
organization, responsiveness, instID, comment)" & _
"VALUES(""" & status & """, """ & enthusiasmB & """, """ & communicationB & """, """ & _
knowledgeB & """, """ & interactionB & """, """ & organizationB & """, """ & _
responsivenessB & """, (" & getFacIDB & "), """ & _
comment & """)"
where
Dim getFacIDB As String = "SELECT instID FROM tblInstructor" & _
" WHERE firstName = '" & firstNameB & "'"
So if you can't tell what I am trying to do is pull the id from another table so that I have a valid faculty reference between the tables. What I am looking for is a Select statement nested inside an Insert statement.
The error I am getting is "Unspecified error" on:
dr = resultsCommandA.ExecuteNonQuery
Any help is appreciated.