johnnyb
04-11-2003, 04:44 AM
Hello,
I'm trying to create an SQL INSERT statement that will get one of the values to be inserted from another table, and the rest from from input,
i.e.: (what I have tried):
"INSERT INTO Addresses (Name, Street, City, State,Phone, Fax, ClientID) VALUES ('" & Request.Form("Name") & "', '" & Request.Form("Street") & "',............., SELECT ClientID FROM Clients WHERE CDKey = " & Request.Form("CDKey") & ")"
I am testing on PWS with MS Jet Server... Access Dabase and I am getting an "Unspecified Error"
Any idea how this is supposed to be done properly?
Thanks,
JB
I'm trying to create an SQL INSERT statement that will get one of the values to be inserted from another table, and the rest from from input,
i.e.: (what I have tried):
"INSERT INTO Addresses (Name, Street, City, State,Phone, Fax, ClientID) VALUES ('" & Request.Form("Name") & "', '" & Request.Form("Street") & "',............., SELECT ClientID FROM Clients WHERE CDKey = " & Request.Form("CDKey") & ")"
I am testing on PWS with MS Jet Server... Access Dabase and I am getting an "Unspecified Error"
Any idea how this is supposed to be done properly?
Thanks,
JB