Issue with delphi xe4 64bit ado provider current dos not support interface for index [closed]

StackOverflow https://stackoverflow.com/questions/21526316

  •  06-10-2022
  •  | 
  •  

سؤال

Connection to db access is ok but i have the following issue :

provider current does not support interface for index

using delphi xe4 64bit

used provider Microsoft Jet 4.0 OLE DB Provider

Anyone can help me .... TIA

هل كانت مفيدة؟

المحلول

AFAIK Jet is not supported any more on 64 bit as direct OleDB provider.

See what MSDN states:

There is no 64-bit version of the Jet Database Engine, the Jet OLEDB Driver, the Jet ODBC Drivers, or Jet DAO available. On 64-bit versions of Windows, 32-bit Jet runs under the Windows WOW64 subsystem. Native 64-bit applications cannot communicate with the 32-bit Jet drivers running in WOW64.

You need to use the ODBC - OleDB bridge to connect to your mdb database.

You should better considering using another engine:

Instead of Microsoft Jet, Microsoft recommends using Microsoft SQL Server Express Edition or Microsoft SQL Server Compact Edition when developing new, non-Microsoft Access applications requiring a relational data store. These new or converted Jet applications can continue to use Jet with the intention of using Microsoft Office 2003 and earlier files (.mdb and .xls) for non-primary data storage. However, for these applications, you should plan to migrate from Jet to the 2007 Office System Driver. You can download the 2007 Office System Driver, which allows you to read from and write to pre-existing files in either Office 2003 (.mdb and .xls) or the Office 2007 (*.accdb, *.xlsm, *.xlsx and *.xlsb) file formats.

Or SQLite3 which is pretty good.

نصائح أخرى

I use this function to access Access MDB files via Jet/ACE OLE on both 64-bit and 32-bit:

FUNCTION AccessConnStr(CONST FileName : STRING) : STRING;
  BEGIN
    {$IFDEF CPUX64 }
      Result:='Provider=Microsoft.ACE.OLEDB.12.0;Data source='+FileName
    {$ELSE }
      Result:='Provider=Microsoft.Jet.OLEDB.4.0.0;Data Source='+FileName
    {$ENDIF }
  END;

Just give the file name to the function, and it'll return the connection string needed to access the file. This works at least with Access MDB files - haven't tried anything else...

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top