mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-17 03:19:29 +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
|
||||
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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user