+ Reply to Thread
Results 1 to 5 of 5

Connecting to SQL from Excel

  1. #1
    Keith La Force
    Guest

    Connecting to SQL from Excel

    Can any one tell me what is the correct function(s) to connect to a SQL 2000
    Database, run a query, and put it in the spreadsheet using VBA for Excel
    2000. Thanks for any help in advance.

  2. #2
    Tom Ogilvy
    Guest

    Re: Connecting to SQL from Excel

    Look in the menu at Data=>Get External Data (or equivalent)

    --
    Regards,
    Tom Ogilvy

    "Keith La Force" <[email protected]> wrote in message
    news:[email protected]...
    > Can any one tell me what is the correct function(s) to connect to a SQL

    2000
    > Database, run a query, and put it in the spreadsheet using VBA for Excel
    > 2000. Thanks for any help in advance.




  3. #3
    Keith La Force
    Guest

    Re: Connecting to SQL from Excel

    Hi, yes I can do it through Data=>Import Data in Excel, but I want to do it
    programatically, through VBA.

    "Tom Ogilvy" wrote:

    > Look in the menu at Data=>Get External Data (or equivalent)
    >
    > --
    > Regards,
    > Tom Ogilvy
    >
    > "Keith La Force" <[email protected]> wrote in message
    > news:[email protected]...
    > > Can any one tell me what is the correct function(s) to connect to a SQL

    > 2000
    > > Database, run a query, and put it in the spreadsheet using VBA for Excel
    > > 2000. Thanks for any help in advance.

    >
    >
    >


  4. #4
    Jim Thomlinson
    Guest

    Re: Connecting to SQL from Excel

    Not trying to be difficult but why in VBA. Unless you need to write back to
    the database, there are very few good reasons to do it through code? You can
    record a macro of Data=>Import Data which is a whole lot easier than getting
    into the ADO recordsets you need otherwise.

    "Keith La Force" wrote:

    > Hi, yes I can do it through Data=>Import Data in Excel, but I want to do it
    > programatically, through VBA.
    >
    > "Tom Ogilvy" wrote:
    >
    > > Look in the menu at Data=>Get External Data (or equivalent)
    > >
    > > --
    > > Regards,
    > > Tom Ogilvy
    > >
    > > "Keith La Force" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > Can any one tell me what is the correct function(s) to connect to a SQL

    > > 2000
    > > > Database, run a query, and put it in the spreadsheet using VBA for Excel
    > > > 2000. Thanks for any help in advance.

    > >
    > >
    > >


  5. #5
    Keith La Force
    Guest

    Re: Connecting to SQL from Excel

    Hi, well I needed to do some complex string manipulation, but I figured out
    how to do it. Thanks for all you help anyway.

    "Jim Thomlinson" wrote:

    > Not trying to be difficult but why in VBA. Unless you need to write back to
    > the database, there are very few good reasons to do it through code? You can
    > record a macro of Data=>Import Data which is a whole lot easier than getting
    > into the ADO recordsets you need otherwise.
    >
    > "Keith La Force" wrote:
    >
    > > Hi, yes I can do it through Data=>Import Data in Excel, but I want to do it
    > > programatically, through VBA.
    > >
    > > "Tom Ogilvy" wrote:
    > >
    > > > Look in the menu at Data=>Get External Data (or equivalent)
    > > >
    > > > --
    > > > Regards,
    > > > Tom Ogilvy
    > > >
    > > > "Keith La Force" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > Can any one tell me what is the correct function(s) to connect to a SQL
    > > > 2000
    > > > > Database, run a query, and put it in the spreadsheet using VBA for Excel
    > > > > 2000. Thanks for any help in advance.
    > > >
    > > >
    > > >


+ 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