Hello, Lele Gaifax said the following on 13.10.2006 17:17:
>> you as the end user connecting to this firebird database *do* know >> which of firebird dialect 1 or 3 which is to be used for each database, >> correct ? > > Well, most probably yes, even though it would be nice having SA figure > out and doing the right right by itself. Possibly, SA could determine firebird's version and use some version-specific features. I have the following example for getting firebird/interbase version: import kinterbasdb import kinterbasdb.services def getFirebirdVersion(host, database, user, password): try: # Get Actual Firebird version string svcCon = kinterbasdb.services.connect(host=host, user=user, password=password) version = svcCon.getServerVersion() except: # Get Interbase-compatible version string con = kinterbasdb.connect(host=host, database=database, user=user, password=password) version = con.server_version platform = version[:2] splitted = version.split() (major, minor, build, revision) = splitted[0][4:].split(".") name = " ".join(splitted[1:]) return(major, minor, build, revision, name, platform) if __name__ == '__main__': host = 'localhost' database = 'employee' user = 'SYSDBA' password = 'masterkey' kinterbasdb.init(type_conv=200) print getFirebirdVersion(host, database, user, password) -- Oleg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy -~----------~----~----~----~------~----~------~--~---