passing parameters

can someone help me on passing parameters to stored procedures in MSAccess using VB6?

for example, i have a stored procedure named "Addrec", which functions for inputting data. if i have parameters: name, address and email.. how can i do it in vb6 code using ADODB.. here are my incomplete sample of codes:


dim cnxn as new ADODB.connection
dim cmd as new ADODB.command


cnxn= (* connection string to database...... *)
cnxn.open

set cmd.ActiveConnection=cnxn

cmd.CommandType = adCmdStoredProc
cmd.CommandText = "Addrec"

'-----------------------------------------------------
* passing of parameters could be right here *
'---------------------------------------------------

cmd.Execute



--- thanks a lot!!!! ;p

Comments

  • : can someone help me on passing parameters to stored procedures in MSAccess using VB6?
    :
    : for example, i have a stored procedure named "Addrec", which functions for inputting data. if i have parameters: name, address and email.. how can i do it in vb6 code using ADODB.. here are my incomplete sample of codes:
    :
    :
    : dim cnxn as new ADODB.connection
    : dim cmd as new ADODB.command
    :
    :
    : cnxn= (* connection string to database...... *)
    : cnxn.open
    :
    : set cmd.ActiveConnection=cnxn
    :
    : cmd.CommandType = adCmdStoredProc
    : cmd.CommandText = "Addrec"
    :
    : '-----------------------------------------------------
    : * passing of parameters could be right here *
    : '---------------------------------------------------
    :
    : cmd.Execute
    :
    :
    :
    : --- thanks a lot!!!! ;p
    :
    :
    hi,
    you can search for your request at www.softricks.5u.com
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion