Starr Duskk
asked on
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.StoredProcedur e
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.O racleType. VarChar
Because the function is looking for an Oracle.DataAccess.Client.O racleDbTyp e
If I try this:
Oracle.DataAccess.Client.O racleDbTyp e.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_cu rsor", System.Data.OracleClient.O racleType. Cursor).Di rection = 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.
I am adding a parameter for an oracle database:
ObjCommand.CommandType = CommandType.StoredProcedur
ObjCommand.Parameters.Add(
It errors saying "OracleType" is not declared.
It suggests I import system.data.oracleclient.
But this won't work:
System.Data.OracleClient.O
Because the function is looking for an Oracle.DataAccess.Client.O
If I try this:
Oracle.DataAccess.Client.O
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(
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
OracleDbType.Varchar2 and refcursor?
OracleDbType.Cursor
More info: http://www.datadirect.com/developer/net/converting_net_application/ref-cursor/index.ssp
More info: http://www.datadirect.com/developer/net/converting_net_application/ref-cursor/index.ssp
Inference of System.Data.DbType from OracleDbType
http://stanford.edu/dept/itss/docs/oracle/10g/win.101/b10117/features004.htm
http://stanford.edu/dept/itss/docs/oracle/10g/win.101/b10117/features004.htm
ASKER