Subject Bookmarks and Searching from TTable to TIB_Query
Author Chris at Visible Changes
I am attempting to convert from the Borlands TTable to TIB_Query because of a problem with arrays from within Interbase Database working with the BDE. It appears that TIB_Query does not support some of the old bookmark and index commands of the TTable component. I have included some code from my C++ Builder application.

TIB_Query *Table_JobClass; // Previous Represented by TTable

void __fastcall TForm_JobClass::Button_SearchClick(TObject *Sender)
{
AnsiString SaveKey;
TBookmark SavePlace;

// Get a bookmark so that we can return to the same record if Search Cancel
SavePlace = Table_JobClass->GetBookmark(); // NOT SUPPORTED

if (SearchForRecords()) // User Selects a Record From Listbox Populated by TIB_Query on another Screen
{
Table_JobClass->Cancel();
SaveKey = Table_JobClass->IndexFieldNames; // NOT SUPPORTED
Table_JobClass->IndexFieldNames = "ID"; // NOT SUPPORTED
Table_JobClass->EditKey(); // NOT SUPPORTED
Table_JobClass->FieldByName("ID")->AsInteger = Search_Select; // Value Return from SearchForRecords()
Table_JobClass->GotoKey(); // NOT SUPPORTED
Table_JobClass->IndexFieldNames = SaveKey; // NOT SUPPORTED
}
else
{
// Move back to the bookmark
Table_JobClass->GotoBookmark(SavePlace); // NOT SUPPORTED
}
Table_JobClass->FreeBookmark(SavePlace); // NOT SUPPORTED
}

I wish to be able to do the following:
a.. Search and move by cursor to the Record that matches a ID value selected from another Screen.
b.. If unsuccessful reset the current position to the bookmark previously set before my search.

Any help would be greatly appreciated. I am sure that there is a better way to search and move the cursor to the desired record with TIB_Query but I am a little new to the IBOJECTS game.


Chris Hulsey
Visible Changes, Inc.
chulsey@...


[Non-text portions of this message have been removed]