-
A stored procedure can do what you want. The stored procedure would look something like the following:
Create Procedure GetClient
@ClientNum int
AS
SELECT * FROM tb_Client WHERE ClientNumber = @ClientNum
To call this stored procedure from VB you can use the ado command object or straight SQL:
lsSQL = "Call GetClient " & ClientNum
recordset = adoconnection.execute(lsSQL)
-
Can anyone give me simple examples on how to pass a value from a VB6 app
into a stored procedure so that it can filter the data from an SQL7
database? Ideally, I'd like to prompt the user: "Please choose client."
And after they input a value, let's say, 300 the stored procedure would
select only data that has 'clientnumber' = 300. And from that point on in
my program, they would be accessing the stored procedure like they would a
normal table, but with only the specified client number. Is this possible?
This something I would need to be able to do many times within my app, so
I'm hoping that there is a simple or practicle way to do this. I've been
getting fustrated using the filter statement in my code. I think a stored
procedure would be better. I need some advice. Thanks.
Eddie