Added support for fbembedded to DBtestframework mantis 23008 patch from Reinier

git-svn-id: trunk@22608 -
This commit is contained in:
ludob 2012-10-10 07:40:23 +00:00
parent 3928be7f4d
commit fed8e11f9b
2 changed files with 25 additions and 0 deletions

View File

@ -79,6 +79,23 @@ user=sysdba
password=masterkey
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]
connector=sql

View File

@ -229,6 +229,14 @@ begin
UserName := dbuser;
Password := dbpassword;
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
begin
FieldNameQuoteChars:=dbquotechars;