If I run a select query with the field name of "ZONE" I get an EOLEException
message saying either "Unspecified Error"

Is "ZONE" a reserved word in ADO, or the OLD DB provider for Jet 4.0?

I am connecting to an Access97 Database  (*.MDB) using the OLE DB Provider
for Jet 4.0

This is the code.

   GetZoneQuery.Sql.Add('SELECT Zone');
   GetZoneQuery.Sql.Add('FROM testtable');
   // *** Error Below ****
   GetZoneQuery.Open;

The ADO Connection object had nothing changed except the connection string.

The error occurs at 3476 in OLEDB.pas in the OpenCursor function

var
  VarRecsAffected: OleVariant;
begin
  if not Assigned(Recordset) then
  begin
    InitializeConnection;
    InitializeRecordset;

   // *** Error Below ****
    Recordset.Open(Source, ActiveConnection,
      CursorTypeValues[FCursorType], LockTypeValues[FLockType],
      CommandTypeValues[CommandType] + ExecuteOptionsToOrd(ExecuteOptions));

This is a real problem because we have a large user base which already has a
database with the field name of "ZONE" in it.

Chris

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to