parameter pass to stored procedure

  • Thread starter Thread starter Ezekiël
  • Start date Start date
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?
 
-----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-----
 
Back
Top