dbCan... example for Delphi
This example displays property values in a message box. You can implement this example by adding a button, with this code, to the project described in ODBC Example for Delphi.
procedure TForm1.Button1Click(Sender: TObject);
var
TempStr, InfoStr: String;
RastODBC: LEADRasterODBC;
begin
RastODBC:= CoLEADRasterODBC.Create ();
if(RastODBC.dbCanAppend) then
InfoStr:= 'dbCanAppend= True' + Chr(13)
else
InfoStr:= 'dbCanAppend= False'+ Chr(13);
if (RastODBC.dbCanRestart) then
TempStr:= 'dbCanRestart= True'+ Chr(13)
else
TempStr:= 'dbCanRestart= False'+ Chr(13);
InfoStr:= InfoStr + TempStr;
if (RastODBC.dbCanScroll) then
TempStr:= 'dbCanScroll= True'+ Chr(13)
else
TempStr:= 'dbCanScroll= False'+ Chr(13);
InfoStr:= InfoStr + TempStr;
if (RastODBC.dbCanUpdate) then
TempStr:= 'dbCanUpdate= True'+ Chr(13)
else
TempStr:= 'dbCanUpdate= False'+ Chr(13);
InfoStr:= InfoStr + TempStr;
TempStr:= 'dbEditMode= '+ IntToStr(RastODBC.dbEditMode) + Chr(13);
InfoStr:= InfoStr + TempStr;
if (RastODBC.dbIsBOF) then
TempStr:= 'dbIsBOF= True'+ Chr(13)
else
TempStr:= 'dbIsBOF= False'+ Chr(13);
InfoStr:= InfoStr + TempStr;
if (RastODBC.dbIsEOF) then
TempStr:= 'dbIsEOF= True'+ Chr(13)
else
TempStr:= 'dbIsEOF= False'+ Chr(13);
InfoStr:= InfoStr + TempStr;
if (RastODBC.dbIsDeleted) then
TempStr:= 'dbIsDeleted = True'+ Chr(13)
else
TempStr:= 'dbIsDeleted = False'+ Chr(13);
InfoStr:= InfoStr + TempStr;
if (RastODBC.dbIsOpen) then
TempStr:= 'dbIsOpen = True'+ Chr(13)
else
TempStr:= 'dbIsOpen = False'+ Chr(13);
InfoStr:= InfoStr + TempStr;
TempStr:= 'dbLoadBits= '+ IntToStr(RastODBC.dbLoadBits ) + Chr(13);
InfoStr:= InfoStr + TempStr;
TempStr:= 'dbLockingMode= '+ IntToStr(RastODBC.dbLockingMode) + Chr(13);
InfoStr:= InfoStr + TempStr;
TempStr:= 'dbRecordCount= '+ IntToStr(RastODBC.dbRecordCount) + Chr(13);
InfoStr:= InfoStr + TempStr;
TempStr:= 'dbCurrentRecord= (0 based)'+ IntToStr(RastODBC.dbCurrentRecord)+Chr(13);
InfoStr:= InfoStr + TempStr;
ShowMessage(InfoStr);
end;