CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Executing MS Access Queries from VB

    Hi,

    Does anyone know if it is possible to get the results or execute an already made Microsoft Access query? If so, does it require you to have MS Access installed on your machine?

    Thank you, very much.


  2. #2
    Join Date
    Aug 1999
    Location
    India-Delhi
    Posts
    106

    Re: Executing MS Access Queries from VB

    Dear,
    You can get the query directly from Access database and you do not require access installed on the client machine. In fact, I always create queries in aceess first and then call them in VB.
    You can simply declare a recordset type variable
    Dim myTB as recordset
    set myTB = mydatabase.openrecordset("Query1")



    Here, I presume that DAO 3.5 is set in preferences and mydatabase is set as database. Query1 is the name of the query you designed and tested in Access.
    I hope this solves your problem.
    Santulan



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

Featured