+ Reply to Thread
Results 1 to 12 of 12

Query problem (Importing Dbase)

  1. #1
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Question Query problem (Importing Dbase)

    Hello,

    I have an excel vba file that imports dBase data by query. Now the strange
    thing is that on new pc's the program does not run any more.

    Still the same version of office.

    The vba script gets stuck at the following code:

    Please Login or Register  to view this content.
    This is error code i receive:
    "The query cannot be executed, or the databasetabel can not be opened"

    Is anyone familiar with this problem? I've tried office settings, references and plugins but i can't seem to find the problem.

    Thanks in advance
    Last edited by Kuijper; 02-10-2014 at 06:23 AM.

  2. #2
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Query problem (Importing Dbase)

    Sorry, didn't notice it the first time.
    Hope someone can help me with this now

  3. #3
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Query problem (Importing Dbase)

    Can anyone help me with this problem? Still not figured it out

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Query problem (Importing Dbase)

    What is version of Office and Windows?
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  5. #5
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Query problem (Importing Dbase)

    Office 2003 SP 3
    Windows 7 Enterprise SP 1
    64 bits

  6. #6
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Query problem (Importing Dbase)

    Has specified Data Source been set up on this PC? May it be accessed using MSQuery?

  7. #7
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Query problem (Importing Dbase)

    I don't think so, if i try to acces it via the menu (outside of vba) (Import External data)
    I get the same error. But i don't know how to specify such a Data Source? I'm fairly new with vba and have never worked with msquery before.

    I already have a source named dBase in the list of database query's so i think he should be able to access it ?

  8. #8
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Query problem (Importing Dbase)

    What is value of strPad that is passed in code? If it is DSN name, then DSN must be set up on the PC.

  9. #9
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Query problem (Importing Dbase)

    strPad value : "\\sw000013\Home$\JKX\Working\0306201 - Capaciteitsmeting\Start materiaal\Meetdata\"

    strBestand : "PNZ_P1_M1_GD1.DBF"

    Don't think this is a DSN name or is it? I'm not really familiar with DSN

  10. #10
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Query problem (Importing Dbase)

    No this is not DSN. If you may not connect manually, I do not think this is code problem. Does this new PC have SP3 applied with it? I think this blocks .dbf file types unless the administrator overrides this.

  11. #11
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Query problem (Importing Dbase)

    Yesh it has SP3 applied, so that could be the problem i'll let you know if this was the case.

    Thanks

  12. #12
    Registered User
    Join Date
    02-10-2014
    Location
    Deventer, The Netherlands
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Query problem (Importing Dbase)

    I'm afraid it's still not solved, the older laptops also have SP 3 installed.
    I've asked the ict desk if it could be user related, so maybe that's the case.

    I'll let you know if i know more. Other suggestions are welcome too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Problem with Excel Web Query importing
    By DiCaver in forum Excel General
    Replies: 9
    Last Post: 02-09-2012, 04:00 AM
  2. Importing Access query into Excel:Microsoft Query
    By ge0rge in forum Excel General
    Replies: 3
    Last Post: 04-02-2009, 10:51 AM
  3. Problem regarding query "where" field when importing
    By lazyme in forum Excel General
    Replies: 0
    Last Post: 10-01-2007, 05:21 PM
  4. Importing SQL query as a cell
    By Arithmomaniac in forum Excel General
    Replies: 1
    Last Post: 08-09-2007, 04:24 PM
  5. [SOLVED] Importing Data via Web Query - Can values be passed to query?
    By jgalenski@charter.net in forum Excel General
    Replies: 5
    Last Post: 05-09-2006, 01:25 PM

Tags for this Thread

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