Additional
dbCAP
AnyDAC
ThinDAC
NCOCI8
Topic: convert a project from BDE to thindac
convert a project from BDE to thindac
Posted: 2007/11/04 06:37
 
hi again..
i converted a bde application to thindac..but with some problems.
for example Tupdatesql .. what can i do for this.
i used anydac dfm convertor too.. and another find-replace list for all units and dfm files..
i think probably somebody did same kind of convert before and more efficient..
thanks for all advices..
RG
Re:convert a project from BDE to thindac
Posted: 2007/11/04 23:22
 
Hello

There is no TTDUpdateSQL.

Instead you should add TTDSQLProcessor.OnGetUpdateSQL event handler. TTDSQLProcessor is server side requests processor, which converts client requests into SQL commands. In that event handler you will need to write something like that:

 procedure TForm1.GetUpdateSQL(ASenderTObject;     AUpdateInfoTTDUpdatesInfo; var ASQLTTDString); begin   if AUpdateInfo.UpdateObject 'MyTab1' then     case AUpdateInfo.UpdateStatus of       usInsertedASQL:= UpdateSQL1.InsertSQL.Text;       usModifiedASQL:= UpdateSQL1.UpdateSQL.Text;       usDeleted:  ASQL:=  UpdateSQL1.DeleteSQL.Text;     end   else if AUpdateInfo.UpdateObject 'MyTab2' then .......................... end;


There AUpdateInfo.UpdateObject is the value of TTDClientDataSet.UpdateOptions.UpdateTableName property. So, you can write there any value, which you can use at server side to distinguish datasets. AUpdateInfo.UpdateStatus is the update status of current update row request. If event handler will return empty ASQL, then will be generated default update SQL.

Regards,
Dmitry