Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

How Do I Run an Access Query from a Windows App Written in C#?

Discussion in 'Information Technology' started by Frank, Jul 28, 2006.

  1. Frank

    Frank
    Expand Collapse
    Guest

    Can anyone provide some sample code?

    I have a feeling I am supposed to use DoCmd.OpenQuery, but I don't know how
    rto structure the code and if I need to add additional namespaces. Please
    help,

    Thanks in advance
     
  2. Loading...


  3. Mr B

    Mr B
    Expand Collapse
    Guest

    You can use:

    currentdb.execute "NameOfYourQuery"

    --
    HTH

    Mr B


    "Frank" wrote:

    > Can anyone provide some sample code?
    >
    > I have a feeling I am supposed to use DoCmd.OpenQuery, but I don't know how
    > rto structure the code and if I need to add additional namespaces. Please
    > help,
    >
    > Thanks in advance
    >
    >
    >
     
  4. '69 Camaro

    '69 Camaro
    Expand Collapse
    Guest

    Hi, Frank.

    > Can anyone provide some sample code?


    Probably not. Access VBA and Jet SQL, the two languages proprietary to
    Microsoft Access, the database product that this newsgroup is devoted to,
    aren't compatible with C#. Perhaps you can post your question in a .Net
    newsgroup?

    HTH.
    Gunny

    See http://www.QBuilt.com for all your database needs.
    See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
    http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
    info.


    "Frank" <fkaesser@pfmail.com> wrote in message
    news:O3y5I7miGHA.412@TK2MSFTNGP05.phx.gbl...
    > Can anyone provide some sample code?
    >
    > I have a feeling I am supposed to use DoCmd.OpenQuery, but I don't know
    > how rto structure the code and if I need to add additional namespaces.
    > Please help,
    >
    > Thanks in advance
    >
     
  5. david epsom dot com dot au

    david epsom dot com dot au
    Expand Collapse
    Guest

    But I can tell you that you will be using ADO.NET,

    Not the Access Application.Docmd object, and not
    the OpenQuery method.

    (david)

    "Frank" <fkaesser@pfmail.com> wrote in message
    news:O3y5I7miGHA.412@TK2MSFTNGP05.phx.gbl...
    > Can anyone provide some sample code?
    >
    > I have a feeling I am supposed to use DoCmd.OpenQuery, but I don't know
    > how rto structure the code and if I need to add additional namespaces.
    > Please help,
    >
    > Thanks in advance
    >
     

Share This Page