> S. Isaac Dealey wrote:
>> i'm not sure if that's thread-safe tho... I don't
>> remember offhand
>> what set nocount does... but the @@identity variable is
>> from any table
>> in any sql server session across the database or possibly
>> the server,

> no, that's an urban myth. it's any table with a column
> that has an
> identity characteristic that you insert data into in your
> current
> session, not the db, not the server & certainly nobody
> else's session.
> scope_identity is mainly used when you have triggers &
> such that can
> change the @@identiy var value before you get at it.

I didn't remember the specifics -- but the current session _can_
include the entire server -- it's real easy if you just create a
trigger that inserts into a table in another db on the same server
that happens to have an identity column in it. At the time I read it,
I considered it bad enough to simply avoid @@identity without
question. Although by and large I avoid identity columns all-together
these days.

> SET NOCOUNT ON/OFF tells sql server to return/not return
> metadata about
> how many rows were affected by the last sq statement. is
> often used to
> shave some time off stuff & was used w/4.5 & cf5 to pack
> more than 1 sql
> server statement into a cfquery. sql server returning row
> counts would
> confuse cf as if it were legitimate results.

That sounds familiar.


s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net
http://www.cfhosting.net

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:187174
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to