Re: How do I execute a stored procedure
- From: "Alex White MCDBA MCSE" <alex@xxxxxxxxxxxxxx>
- Date: Mon, 25 Apr 2005 18:37:46 +0100
Hi Jeff,
passing 2 values to the stored procedure called myStoredProcedureName, this
is the quick and dirty way, you may want to setup a ADO connection and run
it from there.
CurrentProject.Connection.Execute "myStoredProcedureName " &
Me.Religion_ID.Value & ", 'Early'"
A tip, if you have a control on the form called pmyID and you have a
parameter within the stored procedure call @pmyID you should not have to
specify the parameter when calling the stored procedure from the form, as it
will be passed automatically into the stored procedure.
--
Regards
Alex White MCDBA MCSE
http://www.intralan.co.uk
"Jeff Vila via AccessMonster.com" <forum@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in
message news:2ff8904467534e8eb78dee7dc3cca52d@xxxxxxxxxxxxxxxxxxxx
>I have an Access Data Project (Access 2000) that links up to a SQL Server
> on the backend. I have a stored procedure on the SQL server that accepts
> two paramaters and then executes an update command. My question is how do
> I
> reference the stored procedure and pass it the two paramaters in my Visual
> Basic code. From what I understand I have to use ADO and create a public
> subroutine and then call that routine when I want to execute the stored
> procedure. Is there an easier method???? Any help is appeciated. Thanks,
>
> --
> Message posted via http://www.accessmonster.com
.
- Follow-Ups:
- Re: How do I execute a stored procedure
- From: Jeff Vila via AccessMonster.com
- Re: How do I execute a stored procedure
- References:
- How do I execute a stored procedure
- From: Jeff Vila via AccessMonster.com
- How do I execute a stored procedure
- Prev by Date: Re: CurrentUser() returning "Admin" for all Users?
- Next by Date: MDB to ADP/SQL
- Previous by thread: How do I execute a stored procedure
- Next by thread: Re: How do I execute a stored procedure
- Index(es):
Relevant Pages
|