Charlie Clark charlie at
Thu Oct 21 08:06:40 EDT 2004

On 2004-10-21 at 13:40:40 [+0200], juergen.hauptmann 
<juergen.hauptmann at> wrote:
> I use MS SQL Server 2000.
> I can now read the last inserted ID with: SELECT @@IDENTITY as lastid
> But now I cannot do any insert Statement I get the following error:
> Error, pywintypes.com_error: (-2147352567, 'Exception occurred.', (0, 
> 'ADODB.Recordset', 'Operation is not allowed when the object is closed.', 
> 'C:\\WINDOWS\\HELP\\ADO270.CHM', 1240653, -2146824584), None)

This error is fairly self-explanatory. I think you need to check with your 
documentation about this function.

I've only briefly flown over this but it seems that you might indeed need 
to call this function within a single SQL statement. But it looks like 
there are other possibilities of accessing this value.

Good luck!

Charlie Clark

Professional Python Services directly from the Source
 >>> Python/Zope Consulting and Support ...
 >>> mxODBC.Zope.Database.Adapter ...   
 >>> mxODBC, mxDateTime, mxTextTools ...

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Zope-DB mailing list