Re: Getting result of odbc's INSERT INTO command

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Severian [MVP] wrote:

BEGIN TRANSACTION
INSERT INTO...
SELECT MAX(id) FROM table
END TRANSACTION

I found something about SELECT @@IDENTITY

What is your opinion about that?


Not sure, but AFAIK it's not standard SQL. It may be an extension in
one or more databases.

My problem is that other clients could add records in the meantime. My module is using only one connection to serve multiple clients. So I can use a lock.


The Select MAX(id) in this case seems dangerous to me.

Joe
.



Relevant Pages

  • Re: [opensuse] Seamonkey 1.0.6 rpm?
    ... Don't spread false information. ... You should realize that others don't share your opinion but ... are interested in facts. ... If you don't like the extension, ...
    (SuSE)
  • Re: Toll Roads without Toll Booths
    ... Carolina has a very high gas tax. ... do not have enough money to build needed new roads. ... the new toll road will be an extension of what was I-540. ... by Raleigh and Cary becasue (in my opinion) it would allow people to move to ...
    (rec.autos.tech)
  • Re: Sen. Harry Reid, NV: Wildfires caused by global warming
    ... Happily, the case for global warming is being made by scientists, who ... are permanently open to continued testing, extension and refinement. ... pages present a rather different opinion. ...
    (sci.electronics.design)
  • Re: theo please get on the phone.......
    ... >>> However Macha is available. ... >> I thought the Athletics offered him an extension? ... >AFAIK he hasn't agreed yet. ... Prev by Date: ...
    (alt.sports.baseball.bos-redsox)
  • Re: Why is everyone having a go at Dawlish!!!! . . .
    ... Dawlish wrote: ... As for the previous poster. ... Everyone is welcome to an opinion, ... AFAIK you have *never* engaged in any discussion on here and you have ...
    (uk.sci.weather)