- cur.execute('drop table if exists tab1')
- cur.executescript('drop table if exists tab1;')
But why the first one doesn't work if call python script from some tinuous integration tools, such as, Hudson (http://hudson.dev.java.net/)
Why ?
My script for example: drop.py
- import os, re
- import sqlite3
- conn = sqlite3.connect("./SQLiteDatabase.db3")
- cursor = conn.cursor()
- cursor.execute("drop view if exists table1")
- cursor.executescript("drop view if exists table2;")
- conn.close()