In VB I am retrieving one to N number of values and would like to pass this to a Stored procedure as one parameter. Inside the SP I'd like to use the IN statement with this parameter.
VB Code:
This builds this line:
EXEC spAIGDeleteRecID '3/19/2009 12:16:46 PM', '''MN20009'', ''MN20010'''
Here's a simple SP I'm trying to execute:
This returns zero results despite there being data available.
I've played around with the single quotes but everything other then the above errs.
Seems like what I'm trying to should work. Do I have to build a table in my SP or something and store the values?
Please help.
VB Code:
Code:
StrDocumentNames = "'''" & Join(strDocument, "'', ''") & "'''"
objExec.Open "EXEC spAIGDeleteRecID '" & strEntryDateTime & "', " & StrDocumentNames
This builds this line:
EXEC spAIGDeleteRecID '3/19/2009 12:16:46 PM', '''MN20009'', ''MN20010'''
Here's a simple SP I'm trying to execute:
Code:
CREATE PROCEDURE spAIGDeleteRecID(@EntryDateTime VARCHAR(25),
@RecIDs VARCHAR(500)) AS
Select *
From CovgData
Where Entry_Date_Time = @EntryDateTime
And rec_id IN (@RecIDs)
I've played around with the single quotes but everything other then the above errs.
Seems like what I'm trying to should work. Do I have to build a table in my SP or something and store the values?
Please help.