parameter pass to stored procedure

E

Ezekiël

Hello,

How can i pass a parameter or value to a stored procedure within access.

i have an form with a listbox where i can choose a name and the integer
value of the name should be passed to the stored procedure because it
imports a large table with an empty column where the name should update all
the empty rows.

is this possible?
 
M

MGFoster

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You can use an execute statement in ADO (untested):

dim cn as new ado.connection
dim rs as new ado.recordset
dim intParam as integer

intParam = Me!ListBox_Name

set cn = currentproject.connection
set rs = cn.execute ("exec usp_Procedure_Name " & intParam, , adCmdText)

Instead of getting a recordset, perhaps you should just use an UPDATE
stored procedure instead of looping thru the recordset to update the
"empty column."

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQSEjfoechKqOuFEgEQJXVACfV9y3h8T4FMGd2Sr9UK4ixYMq+icAn15l
Okwstx7vbU652YoRsA3U0G1o
=Wsl6
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top