I write a new stored procedure to insert data into a new table I've created, and when I call the stored procedure in my ASP code it is obviously connecting to the database, because it knows the table that is referenced in the stored procedure, but I'm getting an error that says my table is an invalid object. If I view dependencies on the SP, it doesn't show the table.
It seems that if IN the SP I explicitly list the column names I want to use, it CAN see the table in the dependencies, but if I do it the way I *want* to do it, with a dynamically generated list of column names and values (which works just fine if I process the query right in the ASP code), it can't see the table, and I think this is my problem...
I'm not as SQL Server savvy as I should be, so maybe I'm trying to do something I just can't do, but if someone knows... I'm basically trying to do this:
Code: Select all
CREATE PROCEDURE dbo.PDF_Submission_SP
@FieldNames NVARCHAR,
@FieldValues NVARCHAR
AS
insert into z_FormDataTable (@FieldNames)
values (@FieldValues)
GO