Results 1 to 6 of 6

Thread: Macro

  1. #1
    Join Date
    Mar 2004
    Location
    England
    Posts
    4

    Cool Unanswered: Macro

    I have a spreadsheet written in Excel 98. It extracts data using a
    Macro and query from Dbase table using DBase odbc driver.

    This works fine.

    When I try running this on another pc, I get the following error
    message;

    "Run time Error 1004. General ODBC Error"

    I had a look on the ODBC log file, and the following was reported

    Driver's SQLSetConnectAttr failed (0)

    When I click on the deub line, the error is reported at the following;

    Selection.QueryTable.Refresh BackgroundQuery:=False

    Any ideas on how we may resolve? I have ticked ODBC add-in Excel.

    I have even tried changing the False to True.

    Many thanks for your help people. I look forward to your reply.

    Regards

    Jay

  2. #2
    Join Date
    Nov 2003
    Posts
    9
    Hullo. You may want to try checking the OBDC settings of the failing computer. Make sure that it has the correct setup for DBase, mirroring the system that works.

    HTH

    J

  3. #3
    Join Date
    Mar 2004
    Location
    England
    Posts
    4

    macro

    Hi!

    thanks for getting back to me.

    I have checked the driver version (using dbase and the working pc version is the same as the one that does not work...

    Any more kind assistance would greatly be appreciated!!

    Jay

  4. #4
    Join Date
    Mar 2004
    Location
    England
    Posts
    4
    The actual problem paragraph is;

    Sheets("PROVISIONAL").Select
    Range("C6").Select
    ****Selection.QueryTable.Refresh BackgroundQuery:=True
    Sheets("CURRENT WEEK").Select
    Range("A2").Select
    End Sub


    where **** is the problem line..

    hope this can help someone point me in thr right direction!!

    many thanks in advance.

    Jay

  5. #5
    Join Date
    Dec 2003
    Location
    San Diego, CA
    Posts
    153
    Welcome to the Board!

    Have you tried setting up the Data-->Get External Data-->New Database Query sequence and connecting to the Database from the other PC?

    Without the full sequence code, there is no query to refresh. Once you set up the new query, everything should work fine.

    Hope that helps,

    Smitty

  6. #6
    Join Date
    Mar 2004
    Location
    England
    Posts
    4
    Hi there!

    Thanks for getting back to me.

    I have tried your suggestion and the following error message comes up;

    [Microsot][ODBC dBase driver] Index not found.

    The data tables I am used are Dbase with ntx indexes. I have checked my version of the Dbase driver (odbcjt32.dll) and it is the same as the pc that is working.

    Is there anything else that I am missing?

    Many thanks in advance!

    Jay

Posting Permissions

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