ADO Programming

Moderators: None (Apply to moderate this forum)
Number of threads: 87
Number of posts: 225

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
passing parameters Posted by stealthpaw on 19 Sept 2006 at 10:01 PM
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

Report
Re: passing parameters Posted by softricks on 21 Nov 2006 at 3:09 PM
: 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



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.