On Nov 21, Joachim Selke [EMAIL PROTECTED] wrote:
I tried it but there is no SQL command BEGIN TRANSACTION in
DB2. The DB2 equivalent is called BEGIN COMPOUND -- but it seems
it is used in a different way; just replacing this in your code is
not enough.
When you've time, you can try to find
Davide Alberani wrote:
Fixed. Now it's all to see if IMDbPY has decent performances
on a DB2 server... :-)
After running for about 8 hours, the script runs into an error:
[...]
SCANNING actor: Ferguson, Duane (I)
SCANNING actor: Fernández, Florentino (I)
* FLUSHING SQLData...
SCANNING actor:
Davide Alberani wrote:
Seen; I've removed the checkfirst parameter on the dropTable call,
if ibm_db is used.
It's just a horrible work-around and I hope it doesn't break
anything else. :-)
By the way, is it safe to call dropTable() if the table doesn't
exist, with ibm_db?
If not, I assume
On Nov 19, Joachim Selke [EMAIL PROTECTED] wrote:
I think this is neccessary. I get an error (latest CVS version):
Fixed. Now it's all to see if IMDbPY has decent performances
on a DB2 server... :-)
Thank you again!
--
Davide Alberani [EMAIL PROTECTED] [PGP KeyID: 0x465BFD47]
Davide Alberani wrote:
If you find a way to make it work, let me know, please.
I guess I found the problem. Let's have a look at your test case sqla.py
again. If I change the lines
for value in 'movie', 'tv series', 'tv movie', 'video movie', 'tv mini
series', 'video game', 'episode':
Davide Alberani wrote:
So... yes, it's probably a good idea to let the ibm_db developers know
of this behavior.
I just send a message to their mailing list.
What if (just to do a fast test) you change this line of the
setConnection function:
params = {'encoding': encoding}
to this one:
On Nov 16, Joachim Selke [EMAIL PROTECTED] wrote:
params = {'encoding': encoding, 'convert_unicode': True}
It does, great! :-) Thanks!
I've committed it to the CVS (and removed the connection.set_autocommit
call - I assume it's no more needed).
I found another issue regarding the use of
Davide Alberani wrote:
Let me know if it works.
Unfortunately, it doesn't. Same error as before:
RUNNING imdbpy2sql.py
SAVING imdbID values for movies... SKIPPING: no data.
SAVING imdbID values for people... SKIPPING: no data.
SAVING imdbID values for characters... SKIPPING: no data.
SAVING
On Nov 15, Joachim Selke [EMAIL PROTECTED] wrote:
Maybe this problem is not related to the autocommit issue at all. What
makes you conjecture that it is the cause here?
Initially the fact that in some of the first tests the table
was not populated, and later one of your tests in which
Davide Alberani wrote:
In the attachment there's a little example.
It doesn't use IMDbPY, but as far as I can tell the code is totally
equivalent.
Thanks for the code. :-)
Well, actually good news is bad news here: The example works as it
should (up to the last step of printing the result; I
On Nov 15, Joachim Selke [EMAIL PROTECTED] wrote:
Well, actually good news is bad news here: The example works as it
should
[...]
When doing the last step of printing, the program seems to freeze.
[...]
Then, I cannot even abort the program by Ctrl-c.
This bug is way to erratic to be
Davide Alberani wrote:
It can be a problem:
- in your database (some settings about unicode/collations?).
I use a standard installation of DB2 9.5 (latest fixpack) on CentOS 5,
which is a binary-compatiable clone of the Red Hat Enterprise Linux. The
latter is supported by IBM. Therefore, this
On Nov 14, Joachim Selke [EMAIL PROTECTED] wrote:
I use a standard installation of DB2 9.5 (latest fixpack) on CentOS
5, which is a binary-compatiable clone of the Red Hat Enterprise
Linux. The latter is supported by IBM. Therefore, this shouldn't
make any trouble, should it?
Let's assume
Davide Alberani wrote:
I would also try the second test with the ibm_db_dbi.SQL_AUTOCOMMIT_ON
argument.
You're right. This indeed works:
import ibm_db_dbi
connection =
ibm_db_dbi.connect('DATABASE=mydb;HOSTNAME=myhost;PORT=myport;
PROTOCOL=TCPIP;UID=myuser;PWD=mypass;',
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Davide Alberani wrote:
Can I pass this option somehow to IMDbPY within the connection URI?
I'm not sure it should not be considered an ibm_db_sa glitch, but anyway:
try the IMDbPY version in the cvs repository.
I get this error:
Traceback (most
On Nov 14, Joachim Selke [EMAIL PROTECTED] wrote:
The above error can be fixed by changing conn_options to connect_args in
line 401 of alchemyadapter.py.
Fine, but... I'm about to cry. ;-)
But then I get:
[...]
sqlalchemy.exceptions.DBAPIError: (TypeError) connect() keywords must be
Joachim Selke wrote:
sqlalchemy.exceptions.DatabaseError: (DatabaseError)
ibm_db_dbi::DatabaseError: Binding Error: 'INSERT INTO kind_type (kind)
VALUES (?)' [u'movie']
I also tried connection.set_autocommit(True) but it did not change
anything. I also do not get an error message,
First of all: is anyone out there who has successfully used
IMDbPY with DB2 or - at least - knows how to use the ibm_db module?
On Nov 13, Joachim Selke [EMAIL PROTECTED] wrote:
Here are the results:
[...]
cursor.execute('INSERT INTO kind_type (kind) VALUES (?)', ['movie'])
No error, but
18 matches
Mail list logo