| | |
Help with nested sql statements
Please support our VB.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Jun 2007
Posts: 49
Reputation:
Solved Threads: 2
First I will show you my sql, just in case it is some obvious syntax error on my part:
where
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.
VB.NET Syntax (Toggle Plain Text)
"INSERT INTO tblResults(status, enthusiasm, communication, knowledge, interaction, organization, responsiveness, instID, comment)" & _ "VALUES(""" & status & """, """ & enthusiasmB & """, """ & communicationB & """, """ & _ knowledgeB & """, """ & interactionB & """, """ & organizationB & """, """ & _ responsivenessB & """, (" & getFacIDB & "), """ & _ comment & """)"
where
VB.NET Syntax (Toggle Plain Text)
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.
Mr.Wobbles~
![]() |
Similar Threads
- XML Management (RSS, Web Services and SOAP)
- Need opinions on a database design (Database Design)
- Nested insert queries in a single query (MySQL)
- nested joins, from mdb. Possible? (Visual Basic 4 / 5 / 6)
Other Threads in the VB.NET Forum
- Previous Thread: [B]How to read out each character written in a rich text box[/B]
- Next Thread: crystal report
| Thread Tools | Search this Thread |
.net 30minutes 2005 2008 access account arithmetic array arrays basic binary bing button buttons c# center check checkbox code combobox component connectionstring convert crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dropdownlist excel file-dialog folder ftp generatetags google gridview hardcopy image images inline insert intel internet listview mobile monitor ms net networking output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project reports" save searchbox searchvb.net select serial server soap sorting table tcp text textbox timer toolbox trim update updown user usercontrol vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web wpf





