115 |
|
Results: IResultSet; |
116 |
|
begin |
117 |
|
writeln(Outfile,'Scollable Cursors'); |
118 |
+ |
WriteAttachmentInfo(Attachment); |
119 |
|
Transaction := Attachment.StartTransaction([isc_tpb_read,isc_tpb_nowait,isc_tpb_concurrency],taCommit); |
120 |
|
Statement := Attachment.Prepare(Transaction,'Select * from EMPLOYEE order by EMP_NO',3); |
121 |
|
Results := Statement.OpenCursor(true); |
158 |
|
DPB.Add(isc_dpb_password).setAsString(' '); |
159 |
|
DPB.Add(isc_dpb_lc_ctype).setAsString(CharSet); |
160 |
|
DPB.Add(isc_dpb_set_db_SQL_dialect).setAsByte(SQLDialect); |
160 |
– |
DPB.Find(isc_dpb_password).setAsString(Owner.GetPassword); |
161 |
|
try |
162 |
|
Attachment := FirebirdAPI.OpenDatabase(Owner.GetEmployeeDatabaseName,DPB); |
163 |
|
except on e: Exception do |
164 |
|
writeln(OutFile,'Open Database fails ',E.Message); |
165 |
|
end; |
166 |
+ |
DPB.Find(isc_dpb_password).setAsString(Owner.GetPassword); |
167 |
|
writeln(OutFile,'Opening ',Owner.GetEmployeeDatabaseName); |
168 |
|
Attachment := FirebirdAPI.OpenDatabase(Owner.GetEmployeeDatabaseName,DPB); |
169 |
|
writeln(OutFile,'Database Open, SQL Dialect = ',Attachment.GetSQLDialect); |
170 |
|
DoQuery(Attachment); |
171 |
+ |
if Attachment.HasScollableCursors then |
172 |
+ |
try |
173 |
+ |
DoScrollableQuery(Attachment); |
174 |
+ |
except on e: Exception do |
175 |
+ |
writeln(OutFile,'Remote Scrollable cursors test fails ',E.Message); |
176 |
+ |
end; |
177 |
|
Attachment.Disconnect; |
178 |
|
writeln(OutFile,'Now open the employee database as a local database'); |
179 |
|
DPB := FirebirdAPI.AllocateDPB; |