I m trying to run this code , but i dont know how insert the parameters of
the store procedure, someone can help with this????
This is the code of the form:
Option Compare Database
Option Explicit
Public cn As ADODB.Connection
Private Sub Comando10_Click()
Dim inserta As ADODB.Command
Set cn = CurrentProject.Connection
Set inserta = New ADODB.Command
Set inserta.ActiveConnection = cn
inserta.CommandText = "inse1"
inserta.CommandType = adCmdStoredProc
inserta.Execute
and this is the code of the store procedure :
ALTER proc inse1 @conta int, @valor money as
insert xfinanceiro(conta, valor)
select @conta, @valor
How i can insert the parameters @conta and @valor ???
Thanks Alejandro
Malcolm Cook - 05 Aug 2004 16:30 GMT
look at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdmt
happend.asp
then write code like
with inserta
.Parameters.Append .CreateParameter("@param_uno", adVarChar, , 20,"first
param value")
.Parameters.Append .CreateParameter("@param_dos", adVarChar, ,
20,"second param value")
.execute
end with
> I m trying to run this code , but i dont know how insert the parameters of
> the store procedure, someone can help with this????
[quoted text clipped - 26 lines]
>
> Thanks Alejandro
inserta.parameters.refresh
inserta.parameteres(1).value = "abc"
or
inserta.parameters("@conta").value = "abc"
>-----Original Message-----
>I m trying to run this code , but i dont know how insert the parameters of
[quoted text clipped - 29 lines]
>
>.