[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Delphi 2009 Retrieve multiple datasets

Asked by jjcc9432 in Delphi Programming, Delphi Database

Tags: Delphi 2009 Dataabase

I am trying to run batch queries for a project I am on. Does anyone know how to retrieve more than one recordset in delphi?
(i.e. Select * from customer
Select * from items
Should return 2 recordsets I now need to populate 2 DBGrids with each result.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
qry.GetDetailDataSets(dslist);
    repeat
    begin
      wwdbGrid1.DataSource := srcQuery;
      rs := qry.NextRecordset(rowcount);
      if(rs <> nil) Then
      begin
        ds := TDataSource.Create(self);
        qry.GetDetailDataSets(dslist);
        tabsheet := TTabSheet.Create(PageCOntrol1);
        tabsheet.Align := alClient;
        tabsheet.PageControl := PageControl1;
        tabsheet.Parent := PageControl1;
        tabsheet.Caption := 'Query ' + IntToStr(PageControl1.PageCount + 1);
        ds.DataSet := srcQuery.DataSet;
        dbgrid := TwwDBGrid.Create(tabsheet);
        dbgrid.DataSource := ds;
        dbgrid.Align := alClient;
        dbgrid.Parent := tabsheet;
        tabsheet.InsertControl(dbgrid);
        PageControl1.InsertControl(tabsheet);
        tabsheet.Visible := true;
        dbgrid.Visible := true;
        PageControl1.Update;
      end;
    end;
    until rs = nil;
[+][-]10/30/09 03:21 PM, ID: 25707174Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/30/09 03:45 PM, ID: 25707249Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/30/09 06:58 PM, ID: 25708025Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/30/09 07:00 PM, ID: 25708032Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/30/09 07:03 PM, ID: 25708046Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/30/09 07:03 PM, ID: 25708047Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/30/09 07:08 PM, ID: 25708062Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10/30/09 10:58 PM, ID: 25708657Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10/31/09 02:35 PM, ID: 25711648Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/01/09 06:12 PM, ID: 25716687Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/01/09 07:22 PM, ID: 25716897Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/05/09 07:04 PM, ID: 25756302Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/06/09 01:46 PM, ID: 25763360Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 01:53 PM, ID: 25763403Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625