Results 1 to 2 of 2

Thread: help with stored procedures

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2000
    Location
    Oshkosh, WI
    Posts
    163

    Post

    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)


  2. #2
    Junior Member
    Join Date
    Dec 1999
    Posts
    22

    Post

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width