Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default calling oracle stored function with CLOB parameter


Hi,

I'm trying to call an Oracle function with ADODB command that receives
a CLOB parameter, but i don't know what is the correspondent.

I have the following code:

Dim con As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim InputParam As New ADODB.Parameter
Dim ReturnParam As New ADODB.Parameter
Dim auxString As String

auxString = xmlDoc.documentElement.XML
con.ConnectionString = "connection string"
con.Open
cmd.ActiveConnection = con
cmd.CommandText = "MY_PACK.Insert_Data"
cmd.CommandType = adCmdStoredProc
Set InputParam = cmd.CreateParameter("input", adLongVarChar,
adParamInput, , auxString)
Set ReturnParam = cmd.CreateParameter("output", adNumeric,
adParamReturnValue)

cmd.Parameters.Append ReturnParam
cmd.Parameters.Append InputParam

cmd.Execute
MsgBox "Input Value = " & cmd.Parameters(1)
MsgBox "Return Value = " & cmd.Parameters(0)
conn.Close

but i got the following error - Parameter object is improperly defined.
Incosistent or incomplete information was provided - in this line:
cmd.Parameters.Append InputParam

Thanks,


--
Jlorga
------------------------------------------------------------------------
Jlorga's Profile: http://www.excelforum.com/member.php...o&userid=31707
View this thread: http://www.excelforum.com/showthread...hreadid=518656

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can Oracle DB Stored procedure be called in MS Excel? Amol Excel Discussion (Misc queries) 1 January 7th 07 11:05 AM
Sort (parameter stored in cell) GerryK Excel Worksheet Functions 0 March 21st 06 07:41 PM
calling an oracle function from Excel Jlorga[_4_] Excel Programming 0 March 3rd 06 11:34 AM
Calling Oracle Stored Procedure Jim Heavey Excel Programming 3 February 10th 06 02:24 AM
Returning a resultset from Oracle Stored Procedure using ADO (VBA) mary Excel Programming 0 December 30th 05 06:26 PM


All times are GMT +1. The time now is 10:15 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"