OracleDbType for varchar and Cursor

I've inherited old 2.x framework code.

I am adding a parameter for an oracle database:
ObjCommand.CommandType = CommandType.StoredProcedure
            ObjCommand.Parameters.Add("e_this", OracleType.VarChar, 10).Value = strThis

It errors saying "OracleType" is not declared.
It suggests I import system.data.oracleclient.

But this won't work:
System.Data.OracleClient.OracleType.VarChar
Because the function is looking for an Oracle.DataAccess.Client.OracleDbType

If I try this:
Oracle.DataAccess.Client.OracleDbType.VarChar
It says varchar is not a member of OracleDbType.

What do I do?

If I change it to: OracleDbType.Varchar2 will that hurt anything?

I also have:
OracleType.Cursor

Which is errors. How do I pass in a cursor type?

I tried this:
            ObjCommand.Parameters.Add("result_cursor", System.Data.OracleClient.OracleType.Cursor).Direction = ParameterDirection.Output

This does work, but there is no 3rd parameter, and the type the function is looking for is an object.

Should I do it that way for the cursor?

thanks.
LVL 2
Starr DuskkASP.NET VB.NET DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

DhaestCommented:
using ODP.Net you must use OracleDbType
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:
But you did'n answer the question. What is the comparable type for "varchar" and "cursor"?
0
Starr DuskkASP.NET VB.NET DeveloperAuthor Commented:

OracleDbType.Varchar2 and refcursor?
 
0
DhaestCommented:
Inference of System.Data.DbType from OracleDbType
http://stanford.edu/dept/itss/docs/oracle/10g/win.101/b10117/features004.htm
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Oracle Database

From novice to tech pro — start learning today.