Re: Can I return multiple tables using Access 2000?
From: Tom Ellison (tellison_at_jcdoyle.com)
Date: 08/04/04
- Next message: J.J.: "invoice number"
- Previous message: John: "Re: Frontpage Query"
- In reply to: yachea2002_at_hotmail.com: "Re: Can I return multiple tables using Access 2000?"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 04 Aug 2004 11:02:04 -0500
Dear Yachea:
I don't know if you can use the macro from oleDataAdapter, but unless
it supports Office Automation, I doubt it. I would stick with using
the SP directly.
Tom Ellison
Microsoft Access MVP
Ellison Enterprises - Your One Stop IT Experts
On 4 Aug 2004 08:06:28 -0700, yachea2002@hotmail.com wrote:
>I am trying to bind multiple tables (different types of tables) in my
>strongly typed dataset throw an oleDataAdapter using only one stored
>procedure, as I guess, it's could be done on Sql server.
>
>Is it possible then, to call a macro instead of a stored procedure
>from my oleDataAdapter ?
>
>Thank a lot for all your advices,
>
>Yacine.
>
>
>Tom Ellison <tellison@jcdoyle.com> wrote in message news:<vp30h09csnh138j0cgs4mfrhdnl5o0d45q@4ax.com>...
>> Dear Yachea:
>>
>> If the three tables have the same number of columns, and the same
>> column datatypes in the same order, you could build a union of them
>> with an itentifying first column TableNumber, like this:
>>
>> SELECT 1 AS TableNumber, * FROM table1
>> UNION ALL
>> SELECT 2 AS TableNumber, * FROM table2
>> UNION ALL
>> SELECT 3 AS TableNumber, * FROM table3
>>
>> From this query you could then perform any other query, filtering on
>> TableNumber to get the data only from one of the 3 tables. Or you
>> could get the data from all 3 tables taken together, or any 2 of the 3
>> tables.
>>
>> By the way, in the stored procedure this is not one SQL statement, but
>> 3 separate statements returning 3 separate recordsets. In access, the
>> 3 separate recordsets could be returned by putting the 3 separate
>> statements into a macro and running the macro.
>>
>> Perhaps if you explain what effect you're trying to achieve I could
>> advise you better.
>>
>> Tom Ellison
>> Microsoft Access MVP
>> Ellison Enterprises - Your One Stop IT Experts
- Next message: J.J.: "invoice number"
- Previous message: John: "Re: Frontpage Query"
- In reply to: yachea2002_at_hotmail.com: "Re: Can I return multiple tables using Access 2000?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|