tags:

views:

30

answers:

3

Hello,

I am a seasoned .NET / SQL Server developer. I just started a new contract where client is using Oracle, which i've no experience in.

I'm trying to create a WinForms application that will need to talk to the Oracle DB. My frst step was creating a ORacle querying API (which I normally would do in a new MS SQL based project).. I wanted to have a few methods - one such as GetDataSet which returns dataSet.. same for nonquery, scalar, etc...

Well... I can't find ExecuteDataSet inside Oracle.Client namespace. ExecuteNonQuery et al is there... but no DataSet? Can anyone help and fill me in on what I'm missing?

Greatly appreciated!

A: 

You can use the ODP for .NET more

Vash
+1  A: 

When I'm not using an ORM for Oracle work, I usually use the Enterprise Library, which has the methods you are looking for.

Database db = DatabaseFactory.CreateDatabase("connectionStringName");
DbCommand cmd = db.GetSqlStringCommand(myQuery);
// Set parameters, etc. ...
var dataset = db.ExecuteDataSet(cmd);
kbrimington
A: 

I'm pretty sure there's no ExecuteDataSet in the SQLClient namespace. ExecuteDataSet does however exist in the old SQL Helper and the Enterprise Library. SQL Helper of course doesn't work with Oracle, but Ent Lib does

Conrad Frix