| | |
Help with nested sql statements
Please support our VB.NET advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
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 |
"crystal .net .net2005 30minutes 2005 2008 access add application arithmetic array assignment basic box button buttons center check click code combo component connectionstring convert cpu crystalreport data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net dropdownlist editvb.net exists file-dialog firewall folder ftp hardcopy image images isnumericfuntioncall math mobile module mssqlbackend mysql navigate networking opacity output peertopeervideostreaming picturebox1 port print printpreview problemwithinstallation project record regex reports" reuse right-to-left savedialog serial sqldatbase storedprocedure string tcp temp text textbox timer toolbox trim txttoxmlconverter updown useraccounts usercontol usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vb2008 vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf xml





