calling my own VB code using ODBC ?

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

    calling my own VB code using ODBC ?

    HI all,

    is there a way to call my own VB Procedure from a .NET Application
    using ODBC ? I tried different ways like:

    SELECT myProc() FROM...
    SELECT { fn myProc()} FROM...
    SELECT { call myProc()} FROM...
    SELECT { exec myProc()} FROM...

    SELECT { fn now()} FROM.. for instance, works very well.
    Is there a trick or any solution to execute my VB code ?
    Im using Access 2000/ and,or 2003

    thank you
    Sven

  • corey lawson

    #2
    Re: calling my own VB code using ODBC ?

    I think the right (only?) way to do this is to use OLE Automation to
    invoke Access to run your VBA code, and not ODBC. You'll have to look
    around on MSDN, etc., to get the details for it, but it should be
    possible via a COM-.Net bridge.

    Jet (the access database query engine) doesn't do this, if I remember
    correctly.

    Are you having problems running queries in a MDB that use your own VBA
    functions not working via ODBC?

    Sven wrote:
    [color=blue]
    > HI all,
    >
    > is there a way to call my own VB Procedure from a .NET Application
    > using ODBC ? I tried different ways like:
    >
    > SELECT myProc() FROM...
    > SELECT { fn myProc()} FROM...
    > SELECT { call myProc()} FROM...
    > SELECT { exec myProc()} FROM...
    >
    > SELECT { fn now()} FROM.. for instance, works very well.
    > Is there a trick or any solution to execute my VB code ?
    > Im using Access 2000/ and,or 2003
    >
    > thank you
    > Sven
    >[/color]

    Comment

    Working...