DA - Sybase ASA - Custom Driver - Language Restrictions in DASQL

This is a followup to a question we had a month ago. In DASql, where can I find where it is determining what sql language is good or not?

To get our project moving along, we had stopped using our customer Sybase ASA driver based on Liodden NativeDB because we had problems when editting or adding new data. We went back to using the FireDAC ODBC connection for Sybase ASA. But we have been continually running into sql language restrictions. It was said that was because the ODBC connection does not know which database we are using. Based on a prior Talk topic.

So we went back to the NativeDB driver. Long term, this is what we need to work on the M1/M2 Mac Parallels/VmWare machines. There is no odbc that works on the Silicon machines, only TCP will work. That is. better anyway.

But we are getting the same sql statement errors. Is there a setting somewhere that determines ASA is the database so that the DASQL knows that the language used is ok with that database. Based on what we see in the code, the length, trim, etc functions should work.

If it is restriction with the DASQL, where can I add what we need? Or is there a way to execute the sql directly? Below is what we are seeing.

Thanks. Bill Britain




this code is generated in uDASQLExpressions.pas. check TTrimFunctionExpression.Reconstruct method.

Drop email to support, I think we will have some workaround for you soon.

You can use SQLGetData or SQLGetDataEx methods


On the SqlGetData and SqlGetDataEx, how or where is this called by the client? Is this on the adapter or where?

Sorry ahead of time if this is so simple and evident, that the question should not be asked.

Bill Brittain


you can call it manually like:

  r := (svcDynSQLService as IDynSQLService).SQLGetData(YourSQLText, true, -1);
  DataStreamer.Initialize(r, aiRead);
    DataStreamer.ReadDataset(DataStreamer.DatasetNames[0], DataTable, true);

or initialize RDA.GetDataCall method with SQLGetData in design-time.
later pass SQL like

procedure TDynSQLMainClientForm.InitRDA(aIncludeSchema: Boolean;
  AMaxRecords: integer);
  with DataTable do begin
    DARemoteDataAdapter.GetDataCall.ParamByName('aSQLText').AsString := Memo.Lines.Text;
    MaxRecords := AMaxRecords;
    DARemoteDataAdapter.Fill([DataTable], true, aIncludeSchema);

I’ve attached sample from old version of DA that demonstrates it: Dynamic SQL.zip (41.7 KB)