Home » Other » Marketplace » Oracle / Vb Consultant Needed in Youngstown
Oracle / Vb Consultant Needed in Youngstown [message #368903] Mon, 24 January 2000 09:57 Go to next message
ttman138
Messages: 1
Registered: January 2000
Location: IT Mgr
Junior Member
Consultant needed for project help. Help! My programmer needs help getting return values from an Oracle stored procedure using Vb & OO4O Youngstown Ohio.
Re: Oracle / Vb Consultant Needed in Youngstown [message #368904 is a reply to message #368903] Tue, 25 January 2000 16:02 Go to previous message
Paul Goodfellow
Messages: 3
Registered: January 2000
Junior Member
Tom,

Please look at the example below. I hope that it helps.

If your problem is more complex or you have other questions please just let me know.

Regards,

Paul Goodfellow

Oracle function :-

CREATE OR REPLACE FUNCTION testfunc RETURN VARCHAR2 IS
uname VARCHAR2(30);
BEGIN
SELECT user INTO uname FROM DUAL;
RETURN uname;
END;

VB Code Calling Oracle Function using OO4O :-

Dim objOraSess As OraSession
Dim objOraDB As OraDatabase
Dim objOraSQLStmt As OraSqlStmt

Set objOraSess = CreateObject("OracleInProcServer.XOraSession")
Set objOraDB = objOraSess.OpenDatabase("MyDB.World", "user1/password", ORADB_DBDEFAULT)

objOraDB.Parameters.Add "UNAME", "", ORAPARM_OUTPUT
objOraDB.Parameters("UNAME").ServerType = ORATYPE_VARCHAR2

Set objOraSQLStmt = objOraDB.CreateSql("BEGIN :UNAME := TESTFUNC; END;", ORASQL_FAILEXEC)
MsgBox "Currently logged in user is " & objOraDB.Parameters("UNAME").Value
Previous Topic: Oracle Financials and HR/Payroll Needs
Next Topic: Looking for an 3 months internship as Oracle Administrator
Goto Forum:
  


Current Time: Tue Apr 16 09:09:42 CDT 2024