Externally Run Access Queries/Function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • John E

    #1

    Externally Run Access Queries/Function

    I have an Access 2000 database in which there are remotely linked SQL tables
    and a couple of local tables.

    If I have queries in Access that are designed to pass data between these
    remote linked and local tables, is it possible to execute these queries
    externally (i.e. from outwith Access) using, for example, .NET/C#? Or is it
    possible to run an Access user defined function or macro externally which
    then in turn deals with the queries?

    I need to be able to do this without it being necessary to have Access open
    if possible. If this isn't possible does anyone have any other suggestions
    as to how I can achieve this?


  • SA

    #2
    Re: Externally Run Access Queries/Function

    John:

    The only way to run a user defined function is to lauch Access; which of
    course you can do using automation and COM instantiating an instance of
    Access and then using the Application object's .Run method to run a function
    contained in the db. Of course you can open the instance in a hidden
    fashion.

    Alternately if all you need to do is to run predefined queries that are
    contained in an access db, you can use DAO or ADO to run those without
    Access at all. The caveat there is that the queries must not contain any
    user defined (VBA) functions or Access specific functions because since the
    libraries that provide that functionality are Access specific ADO/DAO won't
    know what the functions are and will complain.
    --
    Steve Arbaugh
    ACG Soft


    "John E" <La-la-land@hotmial.co m> wrote in message
    news:bnoa01$13s ohv$1@ID-83837.news.uni-berlin.de...[color=blue]
    > I have an Access 2000 database in which there are remotely linked SQL[/color]
    tables[color=blue]
    > and a couple of local tables.
    >
    > If I have queries in Access that are designed to pass data between these
    > remote linked and local tables, is it possible to execute these queries
    > externally (i.e. from outwith Access) using, for example, .NET/C#? Or is[/color]
    it[color=blue]
    > possible to run an Access user defined function or macro externally which
    > then in turn deals with the queries?
    >
    > I need to be able to do this without it being necessary to have Access[/color]
    open[color=blue]
    > if possible. If this isn't possible does anyone have any other suggestions
    > as to how I can achieve this?
    >
    >[/color]


    Comment

    Working...