This commit is contained in:
2026-04-13 16:45:07 +02:00
parent dae0558c98
commit a667fb8ba3
12 changed files with 1410 additions and 26 deletions
+38
View File
@@ -0,0 +1,38 @@
import fdb, sys
conn = fdb.connect(
dsn=r"localhost:c:\medicus 3\data\medicus.fdb",
user="SYSDBA", password="masterkey", charset="win1250"
)
cur = conn.cursor()
# Try CSSZ_ODB
try:
cur.execute("SELECT FIRST 30 * FROM CSSZ_ODB")
cols = [d[0] for d in cur.description]
print("CSSZ_ODB cols:", cols)
for r in cur.fetchall():
print(r)
except Exception as e:
print("CSSZ_ODB:", e)
# Try ODB table
try:
cur.execute("SELECT FIRST 30 * FROM ODB")
cols = [d[0] for d in cur.description]
print("ODB cols:", cols)
for r in cur.fetchall():
print(r)
except Exception as e:
print("ODB:", e)
# List all tables with ODB in name
try:
cur.execute("SELECT RDB$RELATION_NAME FROM RDB$RELATIONS WHERE RDB$RELATION_NAME LIKE '%ODB%' AND RDB$SYSTEM_FLAG = 0")
for r in cur.fetchall():
print("Table:", r[0].strip())
except Exception as e:
print("table list:", e)
conn.close()
print("DONE")