Thread View: be.comp.programming
2 messages
2 total messages
Started by Kris Hoobergs
Wed, 17 Sep 2003 12:34
Dataset question
Author: Kris Hoobergs
Date: Wed, 17 Sep 2003 12:34
Date: Wed, 17 Sep 2003 12:34
11 lines
1384 bytes
1384 bytes
Hi, I think I've a simple question. Is it possible to retrieve the used sql command (eg select * from customers) that is used for filling a dataset, if you have only the dataset available? So my method is receiving a dataset and I want to know the used sqlstatement for further use. I don't want this method receiving the sqlstatement as a string. Kris
Re: Dataset question
Author: KLinZ
Date: Wed, 17 Sep 2003 16:08
Date: Wed, 17 Sep 2003 16:08
19 lines
1861 bytes
1861 bytes
In news:3f685515$0$259$4d4efb8e@news.be.uu.net, Kris Hoobergs typed:
> I think I've a simple question.
> Is it possible to retrieve the used sql command (eg select * from
> customers) that is used for filling a dataset, if you have only the
> dataset available?
If your dataset is a TQuery you can do this:
function SQLFromDataSet(DataSet: TDataSet): string;
begin
if DataSet is TQuery then
Result := TQuery(DataSet).SQL
else
Result := '';
end;
--
www.zenobits.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads