Home All Groups Group Topic Archive Search About
Author
17 Apr 2006 2:20 PM
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?

Author
17 Apr 2006 2:46 PM
OHM ( One Handed Man )
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

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net


Show quote
"Max André Bündchen" <nospam@microsoft.com> wrote in message
news:OzcmGniYGHA.1888@TK2MSFTNGP02.phx.gbl...
> 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?
>
Author
17 Apr 2006 3:02 PM
Max André Bündchen
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.

Show quote
"Max André Bündchen" <nospam@microsoft.com> escreveu na mensagem news:OzcmGniYGHA.1888@TK2MSFTNGP02.phx.gbl...
> 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?
>
Author
17 Apr 2006 5:06 PM
OHM ( One Handed Man )
My point is, your post is not clear, and frankly your reply does not make me
want to help you further.

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net

Show quote
"Max André Bündchen" <nospam@microsoft.com> wrote in message
news:%23%23$WV%23iYGHA.4248@TK2MSFTNGP05.phx.gbl...
> 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.
>
> "Max André Bündchen" <nospam@microsoft.com> escreveu na mensagem
> news:OzcmGniYGHA.1888@TK2MSFTNGP02.phx.gbl...
>> 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?
>>
>
>

AddThis Social Bookmark Button