31 |
|
{$DEFINE WINDOWS} |
32 |
|
{$ENDIF} |
33 |
|
|
34 |
< |
{Create and Drop a Database} |
34 |
> |
{Test 1: Create and Drop a Database} |
35 |
|
{ |
36 |
|
This test first attempts to create a database without specifying any parameters |
37 |
|
(should fail). It then goes on to create and drop a database, print out the |
141 |
|
|
142 |
|
writeln(OutFile,'Creating a Database using an SQL Statement'); |
143 |
|
createSQL := Format('create database ''%s'' USER ''%s'' PASSWORD ''%s'' DEFAULT CHARACTER SET %s', |
144 |
< |
[ExtractDBName(Owner.GetNewDatabaseName), Owner.GetUserName, Owner.GetPassword, CharSet]); |
144 |
> |
[Owner.GetNewDatabaseName, Owner.GetUserName, Owner.GetPassword, CharSet]); |
145 |
|
Attachment := FirebirdAPI.CreateDatabase(createSQL,SQLDialect); |
146 |
|
WriteDBInfo(Attachment.GetDBInformation([isc_info_db_id,isc_info_db_SQL_Dialect])); |
147 |
|
WriteAttachmentInfo(Attachment); |
171 |
|
DPB.Add(isc_dpb_lc_ctype).setAsString(CharSet); |
172 |
|
DPB.Add(isc_dpb_set_db_SQL_dialect).setAsByte(SQLDialect); |
173 |
|
|
174 |
< |
Attachment := FirebirdAPI.CreateDatabase(ExtractDBName(Owner.GetNewDatabaseName),DPB); |
174 |
> |
Attachment := FirebirdAPI.CreateDatabase(Owner.GetNewDatabaseName,DPB); |
175 |
|
|
176 |
|
WriteAttachmentInfo(Attachment); |
177 |
|
|
183 |
|
|
184 |
|
PrintDPB(DPB); |
185 |
|
writeln(OutFile,'Creating a Database with a DPD'); |
186 |
< |
Attachment := FirebirdAPI.CreateDatabase(ExtractDBName(Owner.GetNewDatabaseName),DPB); |
186 |
> |
Attachment := FirebirdAPI.CreateDatabase(Owner.GetNewDatabaseName,DPB); |
187 |
|
if Attachment = nil then |
188 |
|
begin |
189 |
|
writeln(OutFile,'Create Database Failed'); |
204 |
|
FBLibrary := LoadFBLibrary(libpath); |
205 |
|
|
206 |
|
writeln(OutFile,'Creating a Database with a DPD using Firebird Library in ',libpath); |
207 |
< |
Attachment := FBLibrary.GetFirebirdAPI.CreateDatabase(ExtractDBName(Owner.GetNewDatabaseName),DPB); |
207 |
> |
Attachment := FBLibrary.GetFirebirdAPI.CreateDatabase(Owner.GetNewDatabaseName,DPB); |
208 |
|
if Attachment = nil then |
209 |
|
begin |
210 |
|
writeln(OutFile,'Create Database Failed'); |