Howdy, Stranger!

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

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

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

  • softrickssoftricks Posts: 24Member
    : 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.