RE: ODBC and stored procedures???
Posted in 1997
} } I hope this get through. } } In ODBC when using procedures try the following syntax. } } {call procedure_name( parmvalue1, parmvalue2)} } } If the driver supports the canonical call syntax it will convert this to } an } execute procedure_name( parmvalue1, parmvalue2) } for sybase and for oracle if the driver supports it, the call will be } converted to what ever Oracle expects. } } In this example the procedure_name is your stored procedure you want } executed and the parmvalue1 etcetra are the actual parameters. I am not } sure if you can do dynamic parameter binding using this syntax. I would } guess not. } } } You can find a discussion of this in the ODBC Programmers Reference in } the Executing SQL chapter (usually chapter six ) topic heading of } procedures (usually the last issue discussed in this chapter). The } Driver vendor should document the extent of the ODBC syntax that they } support. For example the Intersolv SQL10 odbc driver does in fact } support this syntax as well as the intersolv Sybase DirectCONNECT odbc } driver. As to the Oracle drivers, ask the vendor. Keep in mind that } Intersolv is not the only driver vendor. If the vendor does not support } the syntax you need, shop around!! } } I hope this helps and good luck, } } Ken Crismon } kcrismon@sybase.com } } ---------- } From: informix-list-owner[SMTP:informix-list-owner@rmy.emory.edu] } Sent: Wednesday, February 05, 1997 11:00 AM } To: Feng Huang } Cc: <5d5om4$3j0@snocap.cs.umd.edu> In-Reply-To } Subject: Re: ODBC and stored procedures??? } } Hi } } I dont know how compatible Oracle is with Sybase. As for as stored } procedures } go, even if ODBC does not handle such a function (I am not sure if it } does) you can work around the problem. Use a database trigger to activate } the stored procedure and use a dummy table operation to activate the } trigger. this way you bypass the ODBC altogether. } } Good Luck ! } } Chaminda Peries } } } On 3 Feb 1997, Feng Huang wrote: } } } Hi, ODBC experts, } } } } I've got a question regarding ODBC and stored procedures. Suppose I } need to } } write an application with ODBC accessing Oracle and Sybase. We plan to } } develop some stored procedures in Oracle and Sybase. Is is possible to } make } } the application code portable across Oracle and Sybase, and maybe some } other } } DBMS? The programming language will be C++. Both client and server will } be } } on Unix. So I guess I need to find some Unix driver as well. } } } } How well is the ODBC API with respect to calling stored procedures, or } this } } is purely up to the driver implementation? } } } } I'd appreciate any help from you. Thank you very much. } } } } } } --Frank } } fhuang@cs.umd.edu } } } } } }