Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP General (http://www.velocityreviews.com/forums/f65-asp-general.html)
-   -   default value in field (http://www.velocityreviews.com/forums/t797757-default-value-in-field.html)

Lex Luthor 01-27-2005 08:32 AM

default value in field
 
with "select @@IDENTITY" i get the value of the last field insered.. i would
like to get also the field.name help me plaese



Steven Burn 01-27-2005 10:32 AM

Re: default value in field
 
http://aspfaq.com/show.asp?id=2174

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"Lex Luthor" <marco@brain-farm.com> wrote in message news:#8ObCrEBFHA.3588@TK2MSFTNGP11.phx.gbl...
| with "select @@IDENTITY" i get the value of the last field insered.. i would
| like to get also the field.name help me plaese
|
|

Bob Barrows [MVP] 01-27-2005 01:17 PM

Re: default value in field
 
Lex Luthor wrote:
> with "select @@IDENTITY" i get the value of the last field insered..
> i would like to get also the field.name help me plaese


That's not possible. The rdbms does not return this information. You need to
know your database and you need to know what your code is doing. And even
then ... Say you run an INSERT statement which inserts data into a table
that contains both an IDENTITY column and a trigger. If the trigger inserts
a record into another table containing an IDENTITY column, @@IDENTITY will
contain the value for the trigger INSERT. In SQL2000, the SCOPE_IDENTITY
function solves this problem; however, it is still up to the developer to
know what table he is inserting records into and what the name of the
IDENTITY column is.

Sorry,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"




All times are GMT. The time now is 01:15 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.