Last active
August 29, 2015 14:26
-
-
Save movermeyer/6a6603f0504f5fa94ae1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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