M
Max André Bündchen
I'm new in .Net world and I have a multi database system to develop in my hands. This system should work with SQL Server, Oracle and
Firebird.
In the .Net world I could make a DAL with typed datasets (one set for each DB) and all works with no problems. However, I couldn't
work with typed datasets for many project reasons. Instead I would like with direct SQL and own data access logic. All fine with
that, because I can make a Helper class using the System.Data.Common of the .Net 2.0.
In this scenery I have some questions. For example, when I accomplish a INSERT in a table with a id column filled by the DB (a
auto-inc field), how take to the application this new ID in a concurrency scenery? The typed dataset make that using a proprietary
sintax for each DB (i.e., the scope_identity() for SQL Server), but if I need a DB-agnostic DAL, I don't know how accomplish that.
Sure I can make a stored procedure for that, but in this case I will manage three sets of stored procedures, one for each table of
each DB, and it's a (big) problem in my case.
Firebird.
In the .Net world I could make a DAL with typed datasets (one set for each DB) and all works with no problems. However, I couldn't
work with typed datasets for many project reasons. Instead I would like with direct SQL and own data access logic. All fine with
that, because I can make a Helper class using the System.Data.Common of the .Net 2.0.
In this scenery I have some questions. For example, when I accomplish a INSERT in a table with a id column filled by the DB (a
auto-inc field), how take to the application this new ID in a concurrency scenery? The typed dataset make that using a proprietary
sintax for each DB (i.e., the scope_identity() for SQL Server), but if I need a DB-agnostic DAL, I don't know how accomplish that.
Sure I can make a stored procedure for that, but in this case I will manage three sets of stored procedures, one for each table of
each DB, and it's a (big) problem in my case.