+ Reply to Thread
Results 1 to 2 of 2

connect to MS SQL

  1. #1
    mk
    Guest

    connect to MS SQL

    Hi
    I need to connect from excel macro to MS SQL Server. I registered
    ado.ocx but when I try to use it I have massage about linces restriction.
    So how I can connect to MS SQL server to take some information and use
    it in my macro.
    I'm writing it for barcode terminal.
    http://www.nordicid.com/fileadmin/su.../software1.htm

    thanks
    mk

  2. #2
    K Dales
    Guest

    RE: connect to MS SQL

    The ado.ocx is an ActiveX control that needs to be licensed to be used in a
    project and you , apparently, do not have that license. You should still be
    able to use ADO in VBA if you add a reference to "Microsoft ActiveX Data
    Objects Library" (this should be the file "msadonn.dll" where nn is the
    version number). But even easier is to let MSQuery do the work for you: from
    the Data menu choose "Import External Data..." and "New Database Query..."
    Then you need to specify your data source (SQL Server) and design a query in
    MSQuery to get the data you want (MSQuery acts a little like MS Access).
    Once you have your data set you "Return Data to Microsoft Excel" (File menu
    in MSQuery) and that will dump it onto a worksheet - from there you can use
    formulas and lookups to manipulate the data. For info refer to Help file and
    lookup "Importing Data."

    "mk" wrote:

    > Hi
    > I need to connect from excel macro to MS SQL Server. I registered
    > ado.ocx but when I try to use it I have massage about linces restriction.
    > So how I can connect to MS SQL server to take some information and use
    > it in my macro.
    > I'm writing it for barcode terminal.
    > http://www.nordicid.com/fileadmin/su.../software1.htm
    >
    > thanks
    > mk
    >


+ 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