Subject | Tib_Query - Dataset is currently open |
---|---|
Author | |
Post date | 2015-05-13T05:40:11Z |
I have a form which when exited would close the datasets (IB_Querys)
used on the form. Under version 4.8.7 this worked fine. After
upgrading to version 5.7.3_2238 we started getting errors of:
"Dataset is currently open"
I traced this to the exit routines where the datasets where being closed.
After changing the code in the exit to:
if (qyBatchM.State in [dssEdit, dssInsert]) then
qyBatchM.Post;
qyBatchM.Close;
The we stopped getting the error message. So somewhere in our
code the dataset had been put in edit mode maybe by editing a
on screen data field or something. (Dataset code below)
1. So has the actions of the TIBQuery.Close changed since v4.8?
2. Are there other things we should watch out for like this?
Thanks
Michael Horne
object qyBatchM: TIB_Query
IB_Connection = formIBData.cnMain
SQL.Strings = (
'select batchm.*'
'from batchm'
'where BM_ID = :id')
GeneratorLinks.Strings = (
'BatchM.BM_ID=gen_BatchM_id')
GetServerDefaults = True
KeyLinks.Strings = (
'BatchM.BM_ID')
OrderingItemNo = 1
OrderingItems.Strings = (
'Id=bm_id;bm_id')
OrderingLinks.Strings = (
'BM_id=1')
PessimisticLocking = True
RefreshAction = raKeepDataPos
RequestLive = True
BufferSynchroFlags = [bsBeforeEdit]
Left = 32
Top = 280
ParamValues = (
'ID=00000000')
end