Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

i am new to .net and i am using 2003.Can any one help me with a simple C# or Vb.net program to connect to a oracale 8.0.5 database and pass some values to a stored procedure.

 

thanks,

shankar

Posted

This is a not so simple task. There are some things that you need first.

1. An oracle listener file.(for Oracle 8) this is most of the time provided/included in an Oracle procedure editing software like toad. So if you have Toad installed, then you can connect. For newer Oracle verions (Oracle 10g) you can use ODP.Net which is the dataprovider for Oracle.

2. Of course you will need to have Include System.Data.OracleClient namespace.

 

For the stored procedures:

it is almost the same as SQLServer but most cases you will need ot explicitly declare an output parameter.

 

Something of the likes of:

Dim myOutparam as New OracleParameter

With myOutParam

.ParameterName = @outData

.ParameterDirection = Output

End With

 

For the Oracle Stored Procedure itself, it needs to declare an output parameter as Type Cursor.

 

I hope this helps.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...