ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/fbintf/testsuite/Test1.pas
(Generate patch)

Comparing ibx/trunk/fbintf/testsuite/Test1.pas (file contents):
Revision 46 by tony, Tue Dec 6 10:33:46 2016 UTC vs.
Revision 47 by tony, Mon Jan 9 15:31:51 2017 UTC

# Line 65 | Line 65 | end;
65   procedure TTest1.RunTest(CharSet: string; SQLDialect: integer);
66   var DPB: IDPB;
67      Attachment: IAttachment;
68 <    DBInfo: IDBInformation;
69 <    ConType: integer;
70 <    DBFileName: string;
71 <    DBSiteName: string;
68 >    createSQL: string;
69   begin
70    writeln(OutFile,'Creating a Database with empty parameters');
71    Attachment := FirebirdAPI.CreateDatabase('',nil,false);
# Line 77 | Line 74 | begin
74    else
75      Attachment.DropDatabase;
76  
77 +  writeln(OutFile,'Creating a Database using an SQL Statement');
78 +  createSQL := Format('CREATE DATABASE ''%s'' USER ''%s'' PASSWORD ''%s'' DEFAULT CHARACTER SET %s',
79 +                      [Owner.GetNewDatabaseName, Owner.GetUserName, Owner.GetPassword, CharSet]);
80 +  Attachment := FirebirdAPI.CreateDatabase(createSQL,SQLDialect);
81 +  WriteDBInfo(Attachment.GetDBInformation([isc_info_db_id,isc_info_db_SQL_Dialect]));
82 +
83 +  writeln(OutFile,'Dropping Database');
84 +  if Attachment <> nil then
85 +    Attachment.DropDatabase;
86 +
87    writeln(OutFile,'Creating a Database with a DPD');
88    DPB := FirebirdAPI.AllocateDPB;
89    DPB.Add(isc_dpb_user_name).setAsString(Owner.GetUserName);
# Line 100 | Line 107 | begin
107      writeln(OutFile,'Create Database Failed');
108      Exit;
109    end;
110 <  DBInfo := Attachment.GetDBInformation([isc_info_db_id]);
104 <  DBInfo[0].DecodeIDCluster(ConType,DBFileName,DBSiteName);
105 <  writeln(OutFile,'Database ID = ', ConType,' FB = ', DBFileName, ' SN = ',DBSiteName);
106 <  DBInfo := Attachment.GetDBInformation([isc_info_ods_version]);
107 <  write(OutFile,'ODS major = ',DBInfo[0].getAsInteger);
108 <  DBInfo := Attachment.GetDBInformation([isc_info_ods_minor_version]);
109 <  writeln(OutFile,' minor = ', DBInfo[0].getAsInteger );
110 >  WriteDBInfo(Attachment.GetDBInformation([isc_info_db_id,isc_info_ods_version,isc_info_ods_minor_version]));
111  
112    {Querying Database}
113    DoQuery(Attachment);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines