passing parameter to stored procedure in Access


This is my first time using sql server and there's lots I'm still figuring out.

I know how to pass a parameter to a stored procedure when my stored procedure is the data source for a report.

But this is different - I created a stored procedure that gives data needed for a mail merge. The caseID is variable.

I have a button on my case form that, when clicked, outputs the stored procedure to an excel document so that it can be used as a mail merge source. Right now it (as expected) prompts the user to enter the Case ID. But that is a hidden field anyway. I want to take the Case ID from the current record and make it the value of @CaseID.

Can anyone tell me how to do this
Posted On: Monday 26th of November 2012 02:34:56 AM Total Views:  195
View Complete with Replies

RELATED TOPICS OF Microsoft SQL Server PROGRAMMING LANGUAGE




How transfer access tables to sql server 2000 ?

Hi . I got a db in access and want to transfer it to sql server with all its reletionship and connect my access bounded forms to sql server . i be happy if some one show me how to transfer my access 2000 tables to sql server 2000 and make connection to sql sever tables from bounded access 2000 forms
VIEWS ON THIS POST

294

Posted on:

Monday 26th November 2012
View Replies!

need help creating stored procedure

hi , i nid to create a stored procedure which clears the database every 3 months for example on June 1 [sep 1,dec 1, etc] the stored procedure will delete all records dated b4 june 1. i have browse thru different tutorials on the web and have read abt cursors, but i do not know how to use it. could someone kindly give me a head start thanx
VIEWS ON THIS POST

313

Posted on:

Monday 26th November 2012
View Replies!

storesprocedure variables

Hi! I have a storedprocedure question. Can a use a parameter as a SQL-Command. I tried something like this with out success. Code: @sortorder = 'DESC' SELECT * FROM tblUsers ORDER BY usrName @sortorder
VIEWS ON THIS POST

140

Posted on:

Monday 26th November 2012
View Replies!

Datetime parameterized call

Sorry, in advance for bringing up this familiar old problem. I'm trying to get a date into SQL Server using parameterized call to a stored procedure. this line is being flagged up as causing an error. Code: com.parameters.append (com.CreateParameter("@submitDate", DATETIME, adParamInput, 8, now())) The DB is set to datetime and won't let me change the number of chars, so I think I set the call to ask for the same thing. (goodness knows!) So, can anyone see anything obviously wrong with this bit The other lines are similarly formatted but just add varchars and seem OK.
VIEWS ON THIS POST

182

Posted on:

Tuesday 27th November 2012
View Replies!