Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Gene Wirchenko Newsgroups: comp.databases.ms-sqlserver Subject: Re: problem from proc call and autoincreasing key in using otl Date: Mon, 13 Jun 2011 07:28:42 -0700 Organization: A noiseless patient Spider Lines: 22 Message-ID: <5k7cv6hqdgpe2tpumpthql120cict2gob5@4ax.com> References: <3c4bb9a9-97ed-4a95-9982-2afd993017bd@34g2000pru.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="7Qrvczazr82YckO5XW8Vtw"; logging-data="17361"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19Z7Q+7ljQkTv8tiGBGAOqHoALORKEHuBI=" X-Newsreader: Forte Agent 4.2/32.1118 Cancel-Lock: sha1:OwmW39IxnWT5sutVknLcIVMpEBA= Xref: x330-a1.tempe.blueboxinc.net comp.databases.ms-sqlserver:446 On Mon, 13 Jun 2011 07:23:03 +0000 (UTC), Erland Sommarskog wrote: >white_ideal (whiteideal@gmail.com) writes: >> 1. how to get the autoincreasing identity immediately after inserting >> a row? I how you can give me the answer within mysql and sqlserver. > >In SQL Server, use scope_identity(), which must be in the same batch as the >INSERT statement. > >For MySQL, you need to ask in an MySQL forum. > >> 2. why the following code is error with "invalid cursor state"? >> the source code is like this. > >I will have to admit that I have never seen this OTL before. ^^^ What is this abbrev, please? Sincerely, Gene Wirchenko