Dave:

AFAIR this is documented in the less-than-obvious location of the UCI Guide.

Here is a quick example using local UniVerse SQL in a subroutine as a stored
procedure. 
I've used this with OleDB though not with ODBC, using the SQL CALL
statement.

NOTE that if you are using ODBC, I've found that {NATIVE} queries are very
much quicker that regular ODBC queries. Check out the syntax for the NATIVE
statement in the uvodbc guide.

     GetOrdersForCustomer
0001 SUBROUTINE( CustNo )
0002 $Include UNIVERSE.INCLUDE ODBC.H
0003
0004 TCL = "SELECT * FROM ORDERS WHERE CUSTNO = " : CustNo
0005 T = SQLExecDirect(@HSTMT, TCL)
0006 RETURN



Brian 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Dave Tabor
> Sent: 27 July 2005 13:14
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] UVODBC procedure call from VBScript
> 
> Hi, Mr. Jordan.
> 
> I've been considering using ODBC instead of UniObjects for 
> our web project, too, but am unfamiliar with .  Could you 
> please include a small, very generic, code snippet to show 
> what you mean here.  It would be much appreciated!
> 
> Thanks,
> Dave
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of OZEMAIL
> Sent: Tuesday, July 26, 2005 6:21 PM
> To: u2-users@listserver.u2ug.org
> Subject: RE: [U2] UVODBC procedure call from VBScript
> 
> 
> To return a recordset from a UniBasic subroutine to an ODBC 
> call you need to load data into the @HSTMT variable in the 
> UniVerse Basic Subroutine.
> 
> Regards
> David Jordan
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> [EMAIL PROTECTED]
> Sent: Wednesday, 27 July 2005 6:31 AM
> To: u2-users@listserver.u2ug.org
> Subject: [U2] UVODBC procedure call from VBScript
> 
> Hi all,
> 
> I'm trying to convert a web app from Sybase to UV. I've been 
> attempting to get a vbscript app to call a subroutine as a 
> stored procedure. I am able to connect to the database using 
> the OLE provider and retrieve recordsets.
> I'd like to be able to execute stored procs as well. IBM 
> provided me with a VB sample to call a subroutine but I can't 
> seem to implement it in VBScript. I've gone over the docs a 
> million and one times and still can't seem to see what I'm 
> missing. Does anyone have any samples, calling a subroutine 
> through ODBC that would return a rescordset to the script 
> that they would be able to share ?
> 
> Thanks for any help,
> 
> Vance Forste
> --------------------------------------------
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
> -------
> u2-users mailing list
> u2-users@listserver.u2ug.org
> To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
u2-users@listserver.u2ug.org
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to