how to call a stored procedure from ms access to sql server 2000

M

maxzsim

Hi ,

i need help here , i have created a stored procdure in sql server 200 which
return a output but i am not sure how call it from Ms Access using ADO

below is what i have written :

Dim conn1 As New ADODB.Connection
Dim cmdStr As New ADODB.Command
Dim SumOfMoney As Currency
Dim strLoc, sqlStr As String
Dim rs As New ADODB.Recordset




strLoc = "Provider=SQLOLEDB;Data Source=(LOCAL);Initial Catalog=SiDataSQL;
User ID=Sa;Password=;"

conn1.ConnectionString = strLoc
conn1.Open

cmdStr.CommandType = adCmdStoredProc
***************************************8
-- i am stuck here
how can i call the stored procedure with the parameters(an input and a
output parameter) and assign the output to sumOfMoney ?

appreciate any advise

rdgs
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top