Insert Pattern

  • Thread starter Thread starter Max André Bündchen
  • Start date Start date
M

Max André Bündchen

I'm developing a bigger application that will run under three DB (SQL Server, Oracle and Firebird).

I would like to use a helper class (like the Professional ADO.NET 2 example). My problem is 'simple'. In a insert I would like to
use direct SQL and not sp (manage sps for three DBs if a time problem). In a simple insert using ADO.NET 2, how to take back a id
column or other field filled by the DB?
 
Your post is a little confusing to me, can you clarify this following '1.)'
statement please

1.)
My problem is 'simple'. In a insert I would like to use direct SQL and not
sp (manage sps for three DBs if a time problem).

2.) In a simple insert using ADO.NET 2, how to take back a id
Im not sure about Oracle and Firebird, but in SQL, you can use the SELECT
scope_identity() to get the last ID created.

HTH
 
Well, you got the problem.

With SQL Server it's easy deploy what I need. However, with a multi database I don't know whats the best way to accomplish the
insert and return ID using direct SQL.
 
My point is, your post is not clear, and frankly your reply does not make me
want to help you further.
 
Back
Top