shankar_it Posted April 11, 2007 Posted April 11, 2007 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 Quote
Eduardo Lorenzo Posted April 11, 2007 Posted April 11, 2007 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. Quote
Eduardo Lorenzo Posted April 11, 2007 Posted April 11, 2007 one more thing.. be careful handling the Boolean type field of Oracle. It does not return True or False. It returns 'Y' or 'Null' Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.