+ Reply to Thread
Results 1 to 4 of 4

Dynamic SQL Query

  1. #1
    Registered User
    Join Date
    01-17-2006
    Posts
    14

    Dynamic SQL Query

    Is it possible to execute a query independant of a worksheet? For example to run a query that will return data to a variable?

  2. #2
    Tim Williams
    Guest

    Re: Dynamic SQL Query

    Yes. Look at ADO: this can be used in a macro without any worksheet
    involvement.
    I'm assuming you mean *database* query (not web query)





    --
    Tim Williams
    Palo Alto, CA


    "fazstp" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Is it possible to execute a query independant of a worksheet? For
    > example to run a query that will return data to a variable?
    >
    >
    > --
    > fazstp
    > ------------------------------------------------------------------------
    > fazstp's Profile:

    http://www.excelforum.com/member.php...o&userid=30574
    > View this thread: http://www.excelforum.com/showthread...hreadid=502211
    >




  3. #3
    Eric White
    Guest

    RE: Dynamic SQL Query

    Tim's right, ADO is the way to go. Check out:

    http://www.access-programmers.co.uk/...ad.php?t=59811

    Shows how to return an ADO dataset independent of any other object.

    "fazstp" wrote:

    >
    > Is it possible to execute a query independant of a worksheet? For
    > example to run a query that will return data to a variable?
    >
    >
    > --
    > fazstp
    > ------------------------------------------------------------------------
    > fazstp's Profile: http://www.excelforum.com/member.php...o&userid=30574
    > View this thread: http://www.excelforum.com/showthread...hreadid=502211
    >
    >


  4. #4
    Registered User
    Join Date
    01-17-2006
    Posts
    14

    Cool

    Cool, thanks for that. I'll look into it.

    Basically I'm using excel to query an old dos database and the data returned is too big to fit into a worksheet. I'm hoping to return the data to a variable so I can sort it into seperate tables.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1