TheMSsForum.com >> Ado >> Where/how to obtain fix for Q330126 :: 3 postsTIA, Bruce Tag: Where/how to obtain fix for Q330126 Oracle Connection Leak Tag: 72255 .. It seems to me all you need is a DataReader, a Command object, http://www.themssforum.com/Ado/Wherehow-obtain/HOME | Call Oracle Stored Procedure from Visual Basic using ADO 2.6 - ADODB
Command object.
I need the CreateParameter parameter values to call the following
stored procedure in Oracle 7:
CREATE OR REPLACE PROCEDURE DB1.SET_VALUES(x IN OUT VARCHAR) as
y varchar2(500) := upper('all');
[rest of sp logic snipped]
Thanks,
S
CodeGuru: Using stored procedures with ADO:: ActiveX Data Objects (ADO) enables you to write a client application to access . ADO - VC++ Calling Stored Procedures with Parameters - Legacy CodeGuru http://www.codeguru.com/cpp/data/mfc_database/storedprocedures/article.php/c1201HOME | Dear sdunn-ga,
Your answer should look somewhat like this:
'-------------------------------------------------------------------------
Dim x
'Store the value of the input parameter in x (in this example, I'll
'assign "abc" to it
x = "abc"
'Store your database connection string here
Dim strConnection
strConnection = ""
'Other variables
Dim objConnection, objRecordSet, objCommand, objNameParam1
Set objConnection = Server.CreateObject("ADODB.Connection")
Set objRecordSet = Server.CreateObject("ADODB.RecordSet")
Set objCommand = Server.CreateObject("ADODB.Command")
Set objNameParam1 = .CreateParameter("x", adBSTR, adParamInputOutput,
,x)
With objConnection
.ConnectionString = strOraConnection
.Open
End with
With objCommand
.ActiveConnection = objConnection
.CommandType = adCmdText
.CommandText = "{call DB1.SET_VALUES(?,{resultset 10000, x})}"
.Parameters.Append objNameParam1
Set objRecordSet = .Execute()
End With
'Display error message is error occurs
If Err.number <> C# and ADO .NET:: Feb 1, 2005 This method actually builds the syntax for each command that we will . then call the Update method on the DataAdapter object and pass the http://www.codersource.net/csharp_adonet_tutorial_ed.htmlHOME | Dynamic Stored Procedures, ASP, ADO - ASP Free:: 2 posts - Last post: Jul 24, 2000Visit ASP Free to discuss Dynamic Stored Procedures, ASP, ADO. Also help came via the USENET about the CASEWHEN SQL command like http://forums.aspfree.com/sql-development-6/dynamic-stored-procedures-asp-ado-3191.htmlHOME | 0 Then
Response.Clear
DisplayErrorOnly(Err.Description)
Response.End
End If
'Get output of Stored Procedure in a variable...
x = objCommand.Parameters("x").Value
'-------------------------------------------------------------------------
This code snippet is a modification of an actual code that I used in
Visual Basic to connect to Oracle and run a stored procedure. You may
or may not have to make a few changes to this, and I presume you know
VB well enough to be able to do that.
Thanks for using Google Answers!
Regards,
gopalkamat-ga ADO.NET:: Has anyone here used VS 2003 to successfully call a stored procedure in InterBase 7.5 .. If we use SQL Command object or SQL Data Adapter we need not . http://www.devnewsgroups.net/group/microsoft.public.dotnet.framework.adonet/2005week23.aspxHOME | How to use a datareader against an oracle stored procedure:: Feb 23, 2005 How should the syntax be for the OracleClient? // Thanks to your command object. Then when you call ExecuteReader you will be able to http://www.dotnetmonster.com/Uwe/Forum.aspx/dotnet-ado-net/11475/How-to-use-a-datareader-against-an-oracle-stored-procedureHOME |
Sdunn-ga,
The question that you had asked was "I need the CreateParameter
parameter values to call the stored procedure". From the comment put
in by you, it is clear that there was an issue with the Oracle Stored
Procedure, and not the answer given by me.
I believe I deserved a better rating. Thanks for using Google
Answers.
regards,
gopalkamat-ga
Red Hat's Rough Recovery From CFO Exit
Windows Live Finds a New, Pre-installed Home
|