Results 1 to 3 of 3

Thread: Access 97 queries under ADO

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123

    Post

    I have an Access 97 database containing various queries. How can I execute these queries in VB under ADO? Some of the queries take parameters. Thanks in advance.

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Feb 1999
    Location
    Leicester, UK
    Posts
    123

    Post

    C'mon guys!! I don't believe that I'm the first person to want to do this!!

    Where have all the geniuses (genii?) gone?

  3. #3
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105

    Post

    I believe you create a command object and execute it.

    dim RecSet as adodb.recordset
    dim longVal as long

    cmd.CommandText="procedure"
    Set RecSet= cmd.Execute(RecordsAffected:=longVal, Options:=adCmdStoredProc)

    if the procedure sends *1* paramter you can use the following:

    cmd.CommandText="procedure(parameter)" or
    cmd.Execute(RecordsAffected:=longVal, Parameters:="parameter", Options:=adCmdStoredProc)


    if it uses more you have to send an array:

    cmd.Execute(RecordsAffected:=longVal, Parameters:=Array(parm1, parm2), Options:=adCmdStoredProc)



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