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.
var
r:Binary;
begin
r := (svcDynSQLService as IDynSQLService).SQLGetData(YourSQLText, true, -1);
DataStreamer.Initialize(r, aiRead);
try
DataStreamer.ReadDataset(DataStreamer.DatasetNames[0], DataTable, true);
finally
DataStreamer.Finalize;
end;
or initialize RDA.GetDataCall method with SQLGetData in design-time.
later pass SQL like
procedure TDynSQLMainClientForm.InitRDA(aIncludeSchema: Boolean;
AMaxRecords: integer);
begin
with DataTable do begin
Close;
DARemoteDataAdapter.GetDataCall.ParamByName('aSQLText').AsString := Memo.Lines.Text;
MaxRecords := AMaxRecords;
DARemoteDataAdapter.Fill([DataTable], true, aIncludeSchema);
end;
end;
I’ve attached sample from old version of DA that demonstrates it: Dynamic SQL.zip (41.7 KB)