On Aug 16, 11:20 am, Peter Otten <[EMAIL PROTECTED]> wrote: > sapsi wrote: > > [please don't top-post] > > > > > Thank you for the tip, you're absolutely right.I;m getting an > > exception that the name must not be null. However, this is some debug > > output > > --- logging.debug(" %s %s %s" % (vdbname, foldername,where_query)) > > OUTPUT: TestVDB test_b title regexp 'tit' > > --- print vdbname.__class__, > > foldername.__class__,where_query.__class__ > > OUTPUT: <type 'str'> <type 'str'> <type 'str'> > > > --- self.cursor.execute( "insert into __saved_query__(vdb_name, > > query_table_name, query) values (?,?,?)", (vdbname, > > foldername,where_query)) > > > OUTPUT: __saved_query__.vdb_name may not be NULL > > > I honestly don't get it!. Why should this occur? > > Because vbdname is None? > > Seriously, it's hard for us to tell what's going on without the relevant > code. If you don't provide enough context you are on your own. > > Peter
Actualy, vdbname is not none. I checked the value before entering. I found out that by closing the connection and reopening after creating VIEW solved the problem. Not a nice solution but it works and not a hassle given the low frequency of the operation. Regards Saptarshi --code self.cursor.execute( "insert into __smartfolder__ values (?,?,?,?)", (vdbname, foldername,where_query,hrform)) self.conn.commit() self.cursor.execute("CREATE VIEW %s AS %s" % (foldername, query) ) self.conn.close() self.connect_to_db() --- If i didn't close and reopen, the second time i try inserting i get the aforementioned error -- http://mail.python.org/mailman/listinfo/python-list