This is my first foray into stored procedures and I'm getting the following error:
I've figured out why I'm getting the error...because the VALUES I'm trying to insert match the column names of the table I'm inserting into... but I havent figured out how to get the data from my form into the VALUES section of the code.
How do I reference that?
VALUES (form.texbox1.req_id)
VALUES (textbox1.req_id)
???
Code:
[COLOR=red]Server: Msg 128, Level 15, State 1, Procedure MultiTableInsert, Line 23[/color]
The name 'req_id' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted.
Here's the piece of the code causing the error:
INSERT INTO dbo.request_id (req_id, req_type, dep_name, ...)
VALUES (req_id, req_type, dep_name, ...)
I've figured out why I'm getting the error...because the VALUES I'm trying to insert match the column names of the table I'm inserting into... but I havent figured out how to get the data from my form into the VALUES section of the code.
How do I reference that?
VALUES (form.texbox1.req_id)
VALUES (textbox1.req_id)
???