AW: [Zope-DB] ZADODA
Charlie Clark
charlie at egenix.com
Thu Oct 21 08:06:40 EDT 2004
On 2004-10-21 at 13:40:40 [+0200], juergen.hauptmann
<juergen.hauptmann at imc-krems.ac.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.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_globals_50u1.asp
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
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the Zope-DB
mailing list