# Interbase/Firebird Database Abstraction Layer for OpenRMS
import string
import kinterbasdb
def connect (dsn, username, password, dialect=3):
return kinterbasdb.connect(dsn=dsn,
user=username,
password=password,
dialect=dialect
)
def GetRowDict(cursor)
raw_array = cursor.fetchone()
description = cursor.description
index = 0;
retval = {}
while (raw_array[index]):
retval[description[index][0]] = row_array[index]
return retval
TRUE = '1'
FALSE = '0'
BEGIN = ''
COMMIT = 'COMMIT'
|