mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 20:49:19 +02:00
Added support for fbembedded to DBtestframework mantis 23008 patch from Reinier
git-svn-id: trunk@22608 -
This commit is contained in:
parent
3928be7f4d
commit
fed8e11f9b
@ -79,6 +79,23 @@ user=sysdba
|
|||||||
password=masterkey
|
password=masterkey
|
||||||
hostname=localhost
|
hostname=localhost
|
||||||
|
|
||||||
|
; Firebird embedded
|
||||||
|
; Same as Firebird, except we leave the host name blank
|
||||||
|
; and specify a db without path.
|
||||||
|
; Make sure your Firebird embedded library files (.dll/.so/.dylib)
|
||||||
|
; are installed; e.g. on Windows, you can put them in this
|
||||||
|
; directory.
|
||||||
|
; Test code will create db if it doesn't exist; you can
|
||||||
|
; delete an existing db file before the test to start
|
||||||
|
; fresh.
|
||||||
|
[firebirdembedded]
|
||||||
|
connector=sql
|
||||||
|
connectorparams=interbase
|
||||||
|
name=fbembedtest.fdb
|
||||||
|
user=sysdba
|
||||||
|
password=masterkey
|
||||||
|
hostname=
|
||||||
|
|
||||||
; ODBC database:
|
; ODBC database:
|
||||||
[odbc]
|
[odbc]
|
||||||
connector=sql
|
connector=sql
|
||||||
|
@ -229,6 +229,14 @@ begin
|
|||||||
UserName := dbuser;
|
UserName := dbuser;
|
||||||
Password := dbpassword;
|
Password := dbpassword;
|
||||||
HostName := dbhostname;
|
HostName := dbhostname;
|
||||||
|
if (dbhostname='') and (SQLDbType=interbase) then
|
||||||
|
begin
|
||||||
|
// Firebird embedded: create database file if it doesn't yet exist
|
||||||
|
// Note: pagesize parameter has influence on behavior. We're using
|
||||||
|
// Firebird default here.
|
||||||
|
if not(fileexists(dbname)) then
|
||||||
|
FConnection.CreateDB; //Create testdb
|
||||||
|
end;
|
||||||
if length(dbQuoteChars)>1 then
|
if length(dbQuoteChars)>1 then
|
||||||
begin
|
begin
|
||||||
FieldNameQuoteChars:=dbquotechars;
|
FieldNameQuoteChars:=dbquotechars;
|
||||||
|
Loading…
Reference in New Issue
Block a user