Index: packages/lazarus/zdbc.lpk
===================================================================
--- packages/lazarus/zdbc.lpk (revision 2215)
+++ packages/lazarus/zdbc.lpk (working copy)
@@ -26,7 +26,7 @@
-
+
@@ -67,6 +67,14 @@
+
+
+
+
+
+
+
+
Index: packages/lazarus/zdbc.pas
===================================================================
--- packages/lazarus/zdbc.pas (revision 2215)
+++ packages/lazarus/zdbc.pas (working copy)
@@ -1,14 +1,14 @@
-{ Dit bestand is automatisch aangemaakt door Lazarus. Niet wijzigen!
- Deze broncode is alleen gebruikt voor compilatie en installatie.
+{ This file was automatically created by Lazarus. Do not edit!
+ This source is only used to compile and install the package.
}
-unit zdbc;
+unit zdbc;
interface
uses
- ZDbcDbLib, ZDbcInterbase6, ZDbcIntfs, ZDbcMetadata, ZDbcMySql, ZDbcOracle,
- ZDbcPostgreSql, ZDbcSqLite, ZDbcASA, ZDbcPooled;
+ ZDbcDbLib, ZDbcInterbase6, ZDbcIntfs, ZDbcMetadata, ZDbcMySql, ZDbcOracle,
+ ZDbcPostgreSql, ZDbcSqLite, ZDbcASA, ZDbcPooled, ZDbcAdo, ZDbcAdoMetadata;
implementation
Index: packages/lazarus/zplain.lpk
===================================================================
--- packages/lazarus/zplain.lpk (revision 2215)
+++ packages/lazarus/zplain.lpk (working copy)
@@ -24,7 +24,7 @@
-
+
@@ -81,6 +81,14 @@
+
+
+
+
+
+
+
+
Index: packages/lazarus/zplain.pas
===================================================================
--- packages/lazarus/zplain.pas (revision 2215)
+++ packages/lazarus/zplain.pas (working copy)
@@ -9,8 +9,9 @@
uses
ZPlainDbLibDriver, ZPlainDriver, ZPlainLoader, ZPlainMySqlConstants,
ZPlainMySqlDriver, ZPlainOracleConstants, ZPlainOracleDriver,
- ZPlainPostgreSqlDriver, ZPlainSqLiteDriver, ZPlainASADriver, ZPlainASAConstants,
- ZPlainFirebirdDriver, ZPlainFirebirdInterbaseConstants, ZPlainDbLibConstants;
+ ZPlainPostgreSqlDriver, ZPlainSqLiteDriver, ZPlainASADriver,
+ ZPlainASAConstants, ZPlainFirebirdDriver, ZPlainFirebirdInterbaseConstants,
+ ZPlainDbLibConstants, ZPlainAdo, ZPlainAdoDriver;
implementation
Index: src/component/ZPropertyEditor.pas
===================================================================
--- src/component/ZPropertyEditor.pas (revision 2215)
+++ src/component/ZPropertyEditor.pas (working copy)
@@ -230,11 +230,11 @@
, ZSqlMetadata
{$ENDIF}
{$IFNDEF UNIX}
- {$IFNDEF FPC}
+ { $IFNDEF FPC}
{$IFDEF ENABLE_ADO}
, ZDbcAdoUtils
{$ENDIF}
- {$ENDIF}
+ { $ENDIF}
{$ENDIF}
{$IFDEF SHOW_WARNING}
,ZMessages
@@ -782,15 +782,20 @@
((GetZComponent as TZAbstractConnection).Protocol = 'sybase') then
inherited
{$IFNDEF UNIX}
-{$IFNDEF FPC}
+{ $IFNDEF FPC}
{$IFDEF ENABLE_ADO}
else
if ((GetZComponent as TZAbstractConnection).Protocol = 'ado') then
+ {$ifndef FPC}
(GetZComponent as TZAbstractConnection).Database := PromptDataSource(Application.Handle,
(GetZComponent as TZAbstractConnection).Database)
+ {$else}
+ (GetZComponent as TZAbstractConnection).Database := PromptDataSource(Application.MainForm.Handle,
+ (GetZComponent as TZAbstractConnection).Database)
+ {$endif}
{$ENDIF}
+{ $ENDIF}
{$ENDIF}
-{$ENDIF}
else
begin
OD := TOpenDialog.Create(nil);
@@ -1156,15 +1161,20 @@
((GetZComponent as TZConnectionGroup).Protocol = 'sybase') then
inherited
{$IFNDEF UNIX}
-{$IFNDEF FPC}
+{ $IFNDEF FPC}
{$IFDEF ENABLE_ADO}
else
if ((GetZComponent as TZConnectionGroup).Protocol = 'ado') then
+ {$ifndef FPC}
(GetZComponent as TZConnectionGroup).Database := PromptDataSource(Application.Handle,
(GetZComponent as TZConnectionGroup).Database)
+ {$else}
+ (GetZComponent as TZConnectionGroup).Database := PromptDataSource(Application.MainForm.Handle,
+ (GetZComponent as TZConnectionGroup).Database)
+ {$endif}
{$ENDIF}
+{ $ENDIF}
{$ENDIF}
-{$ENDIF}
else
begin
OD := TOpenDialog.Create(nil);
Index: src/dbc/ZDbcAdoMetadata.pas
===================================================================
--- src/dbc/ZDbcAdoMetadata.pas (revision 2215)
+++ src/dbc/ZDbcAdoMetadata.pas (working copy)
@@ -58,7 +58,8 @@
uses
Types, Classes, SysUtils, ZSysUtils, ZClasses, ZDbcIntfs, ZDbcMetadata,
ZDbcResultSet, ZDbcCachedResultSet, ZDbcResultsetMetadata, ZURL,
- ZCompatibility, ZGenericSqlAnalyser, ZPlainAdo, ZDbcConnection;
+ ZCompatibility, ZGenericSqlAnalyser, ZPlainAdo, ZDbcConnection
+ {$ifdef fpc}, Variants{$endif};
type
// technobot 2008-06-27 - methods moved as is from TZAdoDatabaseMetadata:
Index: src/dbc/ZDbcAdoResultSet.pas
===================================================================
--- src/dbc/ZDbcAdoResultSet.pas (revision 2215)
+++ src/dbc/ZDbcAdoResultSet.pas (working copy)
@@ -693,7 +693,11 @@
if (VarType(V) = varOleStr) {$IFDEF UNICODE} or ( VarType(V) = varUString){$ENDIF} then
Result.SetUnicodeString(WideString(V))
else
+{$ifdef fpc}
+ Result.SetUnicodeString(GetStatement.GetConnection.GetIZPlainDriver.ZDbcUnicodeString(ZAnsiString(VarToStr(V)), ConSettings.CTRL_CP));
+{$else}
Result.SetUnicodeString(GetStatement.GetConnection.GetIZPlainDriver.ZDbcUnicodeString(ZAnsiString(V), ConSettings.CTRL_CP));
+{$endif}
else
Result.SetString(AnsiString(V));
end;
Index: src/dbc/ZDbcAdoStatement.pas
===================================================================
--- src/dbc/ZDbcAdoStatement.pas (revision 2215)
+++ src/dbc/ZDbcAdoStatement.pas (working copy)
@@ -58,7 +58,7 @@
uses
Types, Classes, SysUtils, ZCompatibility, ZClasses, ZSysUtils, ZCollections,
ZDbcIntfs, ZPlainDriver, ZDbcStatement, ZDbcAdo, ZPlainAdoDriver, ZPlainAdo,
- ZVariant;
+ ZVariant {$ifdef fpc}, Variants{$endif};
type
{** Implements Generic ADO Statement. }
@@ -73,9 +73,9 @@
destructor Destroy; override;
procedure Close; override;
- function ExecuteQuery(const SQL: string): IZResultSet; override;
- function ExecuteUpdate(const SQL: string): Integer; override;
- function Execute(const SQL: string): Boolean; override;
+ function ExecuteQuery(const SQL: string): IZResultSet; {$ifndef fpc} override; {$endif}
+ function ExecuteUpdate(const SQL: string): Integer; {$ifndef fpc} override; {$endif}
+ function Execute(const SQL: string): Boolean; {$ifndef fpc} override; {$endif}
function GetMoreResults: Boolean; override;
end;
Index: src/Zeos.inc
===================================================================
--- src/Zeos.inc (revision 2215)
+++ src/Zeos.inc (working copy)
@@ -279,12 +279,12 @@
// Enables ADO support in TZConnection/TZDataset
{$IFNDEF ZEOS_DISABLE_ADO}
-{$IFNDEF FPC}
+{ $IFNDEF FPC}
{$IFNDEF UNIX}
{$DEFINE ENABLE_ADO}
{$ENDIF}
+{ $ENDIF}
{$ENDIF}
-{$ENDIF}
// Enables Interbase/Firebird support in TZConnection/TZDataset
{$IFNDEF ZEOS_DISABLE_INTERBASE}