[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.odbcnet

OdbcDataReader from an Oracle 8i Procedure

Frank W Holt Jr

4/10/2002 3:35:00 PM

Hello,

I'm attempting to create an OdbcDataReader from an Oracle 8i Stored
Procedure. The error I'm getting is:

'Syntax Error or Access Violation'

I can get it to work using the same code with OleDB just fine. I realize I'm
probably not using the correct syntax.. I would greatly appreciate any help
on this...

-----------------------------------------------------
The Procedure declaration is:

PROCEDURE FETCH_C130s
(p_vcWHEREClauase VARCHAR2,
p_vcORDERClause VARCHAR2,
p_curResultSet OUT CURSOR_TYPE);

The 'CURSOR_TYPE' is a 'REF CURSOR'.

-------------------------------------------------------
My Calling Code (in VB.NET) is:

Dim dr As OdbcDataReader
Dim con As OdbcConnection
Dim cmd As OdbcCommand

con = New OdbcConnection(<ODBC DSN Connection String>)
cmd = New OdbcCommand()

With cmd
.CommandText = "{Call <SchemaName>.<PackageName>.FETCH_C130s(?, ?,
{resultset 0, p_curResultSet})}")
.CommandType = CommandType.Text
Dim param As OdbcParameter = .Parameters.Add("p_vcWHEREClause",
OdbcType.VarChar)
param.Value = ""
param.Direction = ParameterDirection.Input
param = .Parameters.Add("p_vcORDERClause", OdbcType.VarChar)
param.Value = ""
param.Direction = ParameterDirection.Input
End With

Try
con.Open()
Catch
'Handle connection errors here
End Try

Try
dr = cmd.ExecuteReader(CommandBehavior.CloseConnection)
Catch
'Handle SP call errors here
End Try
-------------------------------------------------------

TIA

-frank



3 Answers

(Steven Bras [MS])

4/11/2002 7:52:00 PM

0

Frank W Holt Jr

4/11/2002 11:35:00 PM

0

Thanks for the feedback...

The reason we are looking at ODBC was because (tell me if i'm wrong) but it
may have better performance then OleDb (since OleDb needs to go through the
Inter-Op layer).

I have MDAC 2.70.7713.0 loaded.

I just downloaded the beta for the managed provider for Oracle today. I will
start testing with that. Any idea when the RTM will be out?

Thanks for your help

-frank




"Steven Bras [MS]" <stevenbr@online.microsoft.com> wrote in message
news:wq3k9FY4BHA.1300@cpmsftngxa07...
> Is there any particular reason you want to use ODBC instead of OLE DB?
What
> version of the Microsoft Data Access Components (or the ODBC driver for
> Oracle) are you using?
>
> Also, we just released the first beta of the managed provider for Oracle,
> which you may be interested in. You can download it from:
>
> http://www.microsoft.com/downloads/release.asp?Relea...
>
> Let me know and I'll continue to assist.
>
> Steven Bras, MCSD
> Microsoft Developer Support/Visual Basic WebData
>
> This posting is provided "AS IS" with no warranties, and confers no
rights.
>
> Are you secure? For information about the Microsoft Strategic Technology
> Protection Program and to order your FREE Security Tool Kit, please visit
> http://www.microsoft.co....


(Steven Bras [MS])

4/12/2002 11:17:00 PM

0