Re: INSERT INTO and cursor

Oleg Broytman <[email protected]>
Newsgroups gmane.comp.python.sqlobject
Message-ID <[email protected]>
Hi!

On Tue, Jan 22, 2013 at 03:21:06PM -0500, Markos Kapes <[email protected]> wrote:
> Any good reason why this code should fail to insert while the underlying query in mysql shell works?
> 	cursor=cbx.conn.cursor()
> 	cursor.execute(u"INSERT INTO notes (message, author) VALUES ('test', 'test');")
> Furthermore, this fails silently, so no error to give me a clue.
> Selects still work as expected, but somehow, all the old legacy code I've got that uses statements of the above type have stopped working.
> As always, thanks much for the advice,

   If there is no error, in what way it fails? It didn't insert the row?
Could it be an automatic rollback at the end of a transaction?

Oleg.
-- 
     Oleg Broytman            http://phdru.name/            [email protected]
           Programmers don't die, they just GOSUB without RETURN.

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnnow-d2d
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.