Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2012 > Beginning Visual Basic 2012
|
Beginning Visual Basic 2012
This is the forum to discuss the Wrox book Beginning Visual Basic 2012 by Bryan Newsome; ISBN: 978-1-118-31181-3
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning Visual Basic 2012 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 7th, 2015, 09:42 AM
Registered User
 
Join Date: Apr 2015
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default calling a oracle stored function from vba macro

hi Friends,
i am trying to call a oracle stored function from vba macro.
i have two input parameter and one output parameter. i need display the ouput parameter
Please help me on this. ia m using following connection,
Set objSession = CreateObject("OracleInProcServer.XOraSession")

Set objDataBase = objSession.OpenDatabase(DB, User & "/" & Pwd, 0)

and this is stored function

create or replace
FUNCTION CMCSP_NWST_INSERT(

P_IN_1 NUMBER,
p_in_2 NUMBER

)
RETURN VARCHAR2
AS
PRAGMA AUTONOMOUS_TRANSACTION;
V_FLAG CHAR(10);
BEGIN

INSERT INTO TEST(A,B) VALUES (P_IN_1,P_IN_2 );
V_FLAG := 'SUCCESS';
COMMIT;
RETURN V_FLAG;
END CMCSP_NWST_INSERT;

Thanks in advance





Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Oracle Stored Procedure using Linked Serve Twinklestar SQL Server 2000 4 September 23rd, 2009 04:02 AM
calling an oracle function from VB6 kalyansarkar108 VB Databases Basics 14 April 3rd, 2007 12:02 PM
Calling VBA macro with Applescript error happyman99 Access VBA 0 October 17th, 2005 11:56 AM
Calling an Oracle Stored Procedure booksnore2 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 2 October 1st, 2004 09:35 AM
Calling Oracle Stored Procedures booksnore2 General .NET 0 August 24th, 2004 02:08 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.