[mod_python] Database Help

Sean Abrahams sa at sfsu.edu
Tue Jan 14 10:49:15 EST 2003


Please ignore my last message. I solved the problem, and it wasn't
mod_python related. It had to do with a global variable mixup.

Ahh, the little things.

I apologize for the inconvenience and thanks again for everyones help.

--Sean


Tuesday, January 14, 2003, 6:07:32 AM, you wrote:

YH> I am going to make a simple guess here. I might be wrong but I have been
YH> caught off guard when I forget to issue a commit statement. Maybe the
YH> database connections on the updates/inserts are not automatically
YH> committing.

YH> -----Original Message-----
YH> From: Sean Abrahams [mailto:sa at sfsu.edu]
YH> Sent: Monday, January 13, 2003 9:11 PM
YH> To: mod_python at modpython.org
YH> Subject: [mod_python] Database Help


YH> I'm implementing mod_python and everything is working fine, until I
YH> try to pass an UPDATE sql statement to a database.

YH> I'm grabbing info from one database, and inserting/updating into
YH> another database.

YH> When grabbing, I call upon my dbSelect(db, keys, sql, rows) function,
YH> which connects to a specified database (db) and selects the info.
YH> Works great.

YH> To update/insert I call upon my dbDo(db, sql) function. This function
YH> connects to the specified database (db) and runs the sql. Python wise
YH> everything seems to work fine. I call the dbDo and nothing appears to
YH> go wrong. Except when I look at the data in the db, it wasn't updated.

YH> All of this works fine from the interpreter, so I'm thinking it may
YH> deal with the way mod_python handles processes and dbconnections, of
YH> which I know very little of.

YH> Thus, does connecting to two different databases, right after one
YH> another, cause a problem in mod_python? I'm supposing I must change my
YH> dbConnect() function to take this into consideration due to the way
YH> mod_python/apache function.

YH> Some ideas? I want to learn!

YH> Thanks,
YH> --Sean

YH> Running:
YH> Apache/2.0.43 (Debian GNU/Linux) DAV/2 mod_python/3.0.1 Python/2.2.1
YH> cx_Oracle

YH> _______________________________________________
YH> Mod_python mailing list
YH> Mod_python at modpython.org
YH> http://www.modpython.org/mailman/listinfo/mod_python




More information about the Mod_python mailing list