Skip to content

Instantly share code, notes, and snippets.

@movermeyer
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save movermeyer/6a6603f0504f5fa94ae1 to your computer and use it in GitHub Desktop.
Save movermeyer/6a6603f0504f5fa94ae1 to your computer and use it in GitHub Desktop.
import firebirdsql
FIREBIRD_HOST = "localhost"
FIREBIRD_DB = "D:\\Databases\\TEST.fdb"
FIREBIRD_USER = "SYSDBA"
FIREBIRD_PASS = "masterkey"
conn = firebirdsql.connect(host=FIREBIRD_HOST, database=FIREBIRD_DB, user=FIREBIRD_USER, password=FIREBIRD_PASS)
cur = conn.cursor()
MIN_NUMBER = 380
MAX_NUMBER = 500
for i in range(MIN_NUMBER,MAX_NUMBER):
if i % 10 == 0:
print "{0}/{1}".format(i,MAX_NUMBER)
try:
cur.execute("select FIRST {0} * from TEST".format(i))
a = cur.fetchall()
if len(a) < i:
print "Stopping at {0} since there are not enough entries in the table.".format(i)
break
except Exception:
print "Failed at {0}".format(i)
raise
conn.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment