-
Execute Store Procedure (ADO)
I have this in RDO 2.0.
Set Sp = New rdoQUERY
sqls$ = "{call MN_Procedure(?,?,?,?)}"
Set Sp = CN.CreateQuery("", sqls)
Sp(0) = var1
Sp(1) = var2
Sp(2) = var3
Sp(3) = var4
Sp.Execute
Sp.Close
How do I make this in ADO?
Thank you
-
Re: Execute Store Procedure (ADO)
Dim conn as new adodb.connection
conn.open strConnection <== your connection string
conn.execute ("sp_NAME")
-t-
"Dbones" <dbonesso@mercovia-sa.com.br> wrote:
>
>I have this in RDO 2.0.
>
>
> Set Sp = New rdoQUERY
> sqls$ = "{call MN_Procedure(?,?,?,?)}"
> Set Sp = CN.CreateQuery("", sqls)
>
> Sp(0) = var1
> Sp(1) = var2
> Sp(2) = var3
> Sp(3) = var4
> Sp.Execute
> Sp.Close
>
>
>
>How do I make this in ADO?
> Thank you
-
Re: Execute Store Procedure (ADO)
'first, get a connecition
dim con as adodb.connection
set con = createobject("adodb.connection")
con.open your_connectstring 'can use odbc dsn, ole-db...
dim cmd as adodb.command
set cmd = createobject("adodb.command")
set cmd.activeconnection = con
cmd.commandtype = adcmdstoredproc
cmd.commandtest = your_storedproc_name
cmd.parameters(0) = your_first_param
cmd.parameters(1) = your_2nd_param
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|