Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Passing Parameters to Stored Procedure using ADO

Author  Topic 

chobo
Starting Member

11 Posts

Posted - 2004-04-09 : 17:05:37
I have created a form that contains a textbox (txtState), button (cmdRun), and listbox (lstResults). I want to use the txtState textbox to supply a parameter to a stored procedure named (test), and then execute the stored procedure by clicking the (cmdRun) button which will display the results in the lstResults listbox.

I have looked around everywhere for a nice simple answer, but only seem to find complex answers. Could someone please provide a nice simple solution. Here is the code for my stored procedure. It's the ADO code that I am having a great deal of trouble with.

create procedure "test" @s nvarchar(2)
as
select states from customers
where states = @s


KnooKie
Aged Yak Warrior

623 Posts

Posted - 2004-04-20 : 06:36:22
may help a bit...........

http://p2p.wrox.com/topic.asp?TOPIC_ID=5485

i've done this before so will try and dig out my examples if i get time.


====
Paul
Go to Top of Page
   

- Advertisement -