Results 1 to 12 of 12

Query problem (Importing Dbase)

Threaded View

  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:

    With ActiveSheet.QueryTables.Add(Connection:=Array( _
            "OLEDB;Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=" & strPad & ";Mode=Share Deny Write;Extended Properties=""""" _
            , _
            ";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=18;Jet OLEDB:Datab" _
            , _
            "ase Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";J" _
            , _
            "et OLEDB:Create System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Co" _
            , "mpact Without Replica Repair=False;Jet OLEDB:SFP=False"), Destination:= _
            Range("A1"))
            .CommandType = xlCmdTable
            .CommandText = Array(strBestand)
            .Name = strBestand
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .BackgroundQuery = True
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = True
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .PreserveColumnInfo = True
            .SourceDataFile = strPad & strBestand
            .Refresh BackgroundQuery:=False <--------
        End With
    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.

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