How to use DataSet for MS-SQL and Oracle

G

Guest

All,

Is it possible to use the same (strongly typed) DataSet object with an
Oracle table adapter (or data adapter) and a MS-SQL table adapter?

It would be nice to use the same dataset object so the calling code can use
only one dataset and not use one for each database type.

Thanks in advance.
 
C

Cor Ligthert [MVP]

Scott,

In Net version 1.x for sure because that does not contain any access parts.
In Net version 2.0 I assume only as long as you create in that more access
methods for your different servers.

Be aware that there is no unique strongly typed dataset class (generated
class or XML) in the world, only inside the Microsoft versions alone I know
at least 3 almost completely different ones.

Cor
 
G

Guest

Cor,

I am not sure if I understand your response.
Are you saying that one can use the same dataset and the same table adapter
for both MS-SQL and Oracle by simply having two access methods, for example
the Fill method. I.E.: Fill_Oracle() and Fill_MS-SQL()?
If so does that mean when going between MS-SQL and Oracle the connection
assignement to the table adapter needs to change?

Scott
 
C

Cor Ligthert [MVP]

Scott,

Exactly

As it is a raw dataset, but by instance the dataset of the strongly typed
dataset from Microsoft 2.0 holds the connection (although the string is in
the config file) inside the dataset, while the 1.1 one does not hold those
connections and adapters.

Cor
 
G

Guest

Cor,

This assumes that the dataset will map directly to either an MS-SQL database
or an Oracle database.
I have read some articles that this is not always true since there can be
some differences of types between MS and Oracle.
Scott
 

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