Subject | Cursory conundrum |
---|---|
Author | sdbeames |
Post date | 2003-05-11T23:13:55Z |
I have an TIB_SessionProps on my main form with UseCursor=true.
When I call a certain modal form (which uses a TIB_Cursor to populate
a TComboBox in its AfterFetchRow handler (with AutoFetchAll=true)), I
get the crSQLWait cursor even when the fetching is complete. How can
I get back the default cursor?
I've tried setting the TIB_SessionProps->UseCursor=false before
creating and showing the modal form, and I've manually attempted to
set the modal forms' cursor to crDefault by adding a test button to
the form, all without success.
The crSQLWait only appears when mousing over the modal form, and is
gone when the form closes, or I call another non-modal form (which
initially has the crSQLWait cursor) to execute another query's Locate
method. It then returns again if I use the cursor to fetch data for
any other TComboBox, eg
IB_Cursor1->SQL->Clear();
IB_Cursor1->SQL->Add("Select HDR_ID, HDRTXT from HDRTEXT order by
HDRTXT");
IB_Cursor1->First();
IB_Cursor1->Unprepare();
In AfterFetchRow(), I just use code like...
sCat = IB_Cursor1->FieldByName("HDRTXT")->AsString;
index = IB_Cursor1->FieldByName("HDR_ID")->AsInteger;
Hdr1CB->Items->AddObject(sCat, (TObject*)index);
Any suggestions please?
Thank you,
Steve
IBO 4.2.Ib
When I call a certain modal form (which uses a TIB_Cursor to populate
a TComboBox in its AfterFetchRow handler (with AutoFetchAll=true)), I
get the crSQLWait cursor even when the fetching is complete. How can
I get back the default cursor?
I've tried setting the TIB_SessionProps->UseCursor=false before
creating and showing the modal form, and I've manually attempted to
set the modal forms' cursor to crDefault by adding a test button to
the form, all without success.
The crSQLWait only appears when mousing over the modal form, and is
gone when the form closes, or I call another non-modal form (which
initially has the crSQLWait cursor) to execute another query's Locate
method. It then returns again if I use the cursor to fetch data for
any other TComboBox, eg
IB_Cursor1->SQL->Clear();
IB_Cursor1->SQL->Add("Select HDR_ID, HDRTXT from HDRTEXT order by
HDRTXT");
IB_Cursor1->First();
IB_Cursor1->Unprepare();
In AfterFetchRow(), I just use code like...
sCat = IB_Cursor1->FieldByName("HDRTXT")->AsString;
index = IB_Cursor1->FieldByName("HDR_ID")->AsInteger;
Hdr1CB->Items->AddObject(sCat, (TObject*)index);
Any suggestions please?
Thank you,
Steve
IBO 4.2.Ib