Code: Alles auswählen
try:
self.cursor.execute(SQLcommand)
return self.cursor.fetchall()
except Exception, e:
print "Error:", e
else:
print "OK"
Code: Alles auswählen
121 print "SQLcommand:", SQLcommand
122 try:
123 self.cursor.execute(SQLcommand)
124 except Exception, e:
125 print "Error:", e
self = <__main__.test instance>, self.cursor = <odbccur object>, self.cursor.execute = <built-in method execute of odbccur object>, SQLcommand = 'CREATE TABLE TestTable (id INTEGER NOT NULL PRIM...AR( 50 ) NOT NULL, data2 VARCHAR( 50 ) NOT NULL);'
dbi.program-error: [Microsoft][ODBC SQL Server Driver][SQL Server]There is already an object named 'TestTable' in the database. in EXEC