Schema NewDataset or Similar function

Hi,

I always use AllTableDASchema.NewDataset to get data.

Is it any way to pass the sql direcrtly to get dataset ?

joe

Hi,

You can use the DASQL feature

I only find the sample on Client if at server side’s service at schema, any example to use DASQL ?

Hi,

we have the DASQL sample.
DASQL technology allows to use known tables (i.e. tables were registered in Schema) as data sources.

Also we have deprecated DataService.SQLGetData/SQLGetDataEx methods.
these methods allow to open any sql, but they are dangerous and insecure because SQL is passed as plain text and malefactor can pass sql like drop database xxx, delete from xxx, etc

Yes I already check those sample. However, I used in server side instead of client side.
Did u mean that I need create as Follow:

lda := TDALocalDataAdapter.Create(Self.Name);
lda.FillWithDASql(table,c_DASQL,nil);

Is it correct? or direct function like schema.fillwithDAsql ???

joe

Hi,

on server-side you can use Connection.NewDataset:

// id: IDAServerDataset
id := Connection.NewDataset(sql) as IDAServerDataset;