Re: Can I return multiple tables using Access 2000?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Tom Ellison (tellison_at_jcdoyle.com)
Date: 08/04/04


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



Relevant Pages

  • Re: Can I return multiple tables using Access 2000?
    ... strongly typed dataset throw an oleDataAdapter using only one stored ... to call a macro instead of a stored procedure ... > column datatypes in the same order, you could build a union of them ... > Tom Ellison ...
    (microsoft.public.access.queries)
  • Translation-Time Type Information
    ... depends on the type of the argument to the macro. ... jumps from one array object to another, dis-joint array object, even ... union short_wrapper; ... char char_func{ ...
    (comp.lang.c)
  • Re: Error 2950
    ... What is the error message? ... It is intriguing to note that you seem to be using the macro to close a form, and then open the same form again. ... Steve Schapel, Microsoft Access MVP ... the macro does run the stored procedure ...
    (microsoft.public.access.macros)
  • Error 2950
    ... So I built a macro to launch a pre-built package. ... an append qry. ... the macro does run the stored procedure ...
    (microsoft.public.access.macros)
  • Re: Declaration, Definition & Reference listers for C
    ... > union, enum, macro, variable and function} {declaration, definition and ...
    (comp.compilers)