DbType for RefCursor

H

H. Mahadevan

I am creating generic DAL that is unaware of underlying
Datasoruce.

i created an abstract for Parameter. In that i am setting
one property called DBType which set the DBtype of the
parameter object but not the specific oracletype or
SqlDbtype.

If i call a SP which return a Cursor, i am specifying it
as DBtype as object. but it says Wrong number or types of
arguments.

How can i pass cursor parameter for oracle.

URGENT!!!

Regards

H. Mahadevan
 
M

Miha Markic

Hi,

I am not 100% sure on this but I guess you'll have to use database specific
enumeration on this.
 
G

Guest

Ok. But how will i know that it is for oracle or sql
server

I will not gather anything specific to oracle/sql server.

so one of property of my custom class which abstracts the
Parameter is DBType. not sqldbtype or oracletype.

i get good number of enumeration in DBType. but that is
not matching for cursor. if i specify DBType as object
and if i cast to oracleparameter its default oracletype
become blob.

that's why it is giving error.

Any way thanks.

if you know the solution let me know .


Regards

H. Mahadevan
 
M

Miha Markic

Ok. But how will i know that it is for oracle or sql
server

At one point you have to know, don't you?
You are certainly creating a connection instance somewhere?
I will not gather anything specific to oracle/sql server.

so one of property of my custom class which abstracts the
Parameter is DBType. not sqldbtype or oracletype.

You'll have to use provider specific classes (not generic interfaces) to
create your parameter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top