I tried it. It still doesn't work. I had to insert the following lines into
_executeQuery to make it get anywhere:
if query == "SET IDENTITY_INSERT cast_info ON;":
query = "SET IDENTITY_INSERT cast_info OFF;"
elif query == "SET IDENTITY_INSERT aka_name ON;":
query = "SET IDENTITY_INSERT aka_name OFF;"
elif query == "SET IDENTITY_INSERT movie_info ON;":
query = "SET IDENTITY_INSERT movie_info OFF;"
After I inserted the last one, I started getting a new error with the
following output:
SCANNING actor: Sergy, José
SCANNING actor: Sewell, Rufus
EXECUTING "BEFORE_PERSONS_TODB:SET IDENTITY_INSERT %(table)s ON;"...
EXECUTING "SET IDENTITY_INSERT name ON;"... DONE!
EXECUTING "AFTER_PERSONS_TODB:SET IDENTITY_INSERT %(table)s OFF;"...
EXECUTING "SET IDENTITY_INSERT name OFF;"... DONE!
EXECUTING "BEFORE_SQLDATA_TODB:SET IDENTITY_INSERT %(table)s ON;"...
EXECUTING "SET IDENTITY_INSERT cast_info ON;"... DONE!
* FLUSHING SQLData...
EXECUTING "AFTER_SQLDATA_TODB:SET IDENTITY_INSERT %(table)s OFF;"...
EXECUTING "SET IDENTITY_INSERT cast_info OFF;"... DONE!
EXECUTING "BEFORE_CHARACTERS_TODB:SET IDENTITY_INSERT %(table)s ON;"...
EXECUTING "SET IDENTITY_INSERT char_name ON;"... DONE!
* FLUSHING CharactersCache...
Traceback (most recent call last):
File "imdbpy2sql.py", line 1979, in <module>
run()
File "imdbpy2sql.py", line 1875, in run
castLists(_charIDsList=characters_imdbIDs)
File "imdbpy2sql.py", line 1104, in castLists
doCast(f, roleid, rolename)
File "imdbpy2sql.py", line 1063, in doCast
cid = CACHE_CID.addUnique(role)
File "imdbpy2sql.py", line 627, in addUnique
else: return self.add(key, miscData)
File "imdbpy2sql.py", line 620, in add
self[key] = c
File "imdbpy2sql.py", line 538, in __setitem__
self.flush()
File "imdbpy2sql.py", line 561, in flush
self._toDB(quiet)
File "imdbpy2sql.py", line 835, in _toDB
CURS.executemany(self.sqlstr, self.converter(l))
File "C:\Python25\Lib\site-packages\pymssql.py", line 152, in executemany
raise DatabaseError, "internal error: %s" % self.__source.errmsg()
pymssql.DatabaseError: internal error: SQL Server message 1204, severity 19,
state 6, line 1:
The instance of the SQL Server Database Engine cannot obtain a LOCK resource
at this time. Rerun your statement when there are fewer active users. Ask
the database administrator to check the lock and memory configuration for
this instance, or to check for long-running transactions.
DB-Lib error message 10007, severity 5:
General SQL Server error: Check messages from the SQL Server.
Who knows why. I've never seen it before.
dave
On Wed, Jun 4, 2008 at 2:37 PM, Davide Alberani <[EMAIL PROTECTED]>
wrote:
> On Jun 04, David Jones <[EMAIL PROTECTED]> wrote:
>
> > The trickiest part was that you MUST have a single backslash between
> > the machine name and the sql server instance name. and between the
> > instance name and the database you MUST use a forward slash!
>
> Utterly crazy. :-)
> Who knows if this is a bug in SQLObject or a problem with escape
> sequences of the Windows' command line...
>
> > But it still has issues with indentity_insert and database
> > locking. I'm going to modify the script to get it to work I think.
>
> No, wait: the "--ms-sqlserver" command line option of imdbpy2sql.py
> is here exactly to take care of errors setting IDENTITY fields.
> Try it, and let me know if it works!
>
>
> --
> Davide Alberani <[EMAIL PROTECTED]> [PGP KeyID: 0x465BFD47]
> http://erlug.linux.it/~da/ <http://erlug.linux.it/%7Eda/>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Imdbpy-devel mailing list
Imdbpy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/imdbpy-devel