Hi Philippe,
De: Philippe Makowski <pmakow...@ibphoenix.fr> Para: firebird-python@yahoogroups.com Enviado: domingo, 23 de septiembre de 2012 5:32 Asunto: Re: [firebird-python] fdb: error on get server version info Maximiliano Robaina [2012-09-22 23:46] : > > I'm trying to retrive the firebird server version using fdb. > There are two way to do this in fdb, using a connection or using firebird > service. > > Is it a fdb bug or I'm misinterpreting something? > Version is a string, not an integer >>> import fdb.services as fbservice >>> svc = fbservice.connect(host='localhost',password='masterkey') >>> print svc.getServerVersion() LI-V2.5.2.26518 Firebird 2.5 Ok, using service worked for me, but conn.database_info doesn't. My mistake was just the second param, It needs to be 's' and I was using 'i' con.database_info(fdb.isc_info_firebird_version, 's') //It works >>> con.database_info(fdb.isc_info_firebird_version, 's') '\x03\x1cLI-V2.5.1.26351 Firebird 2.5,LI-V2.5.1.26351 Firebird 2.5/tcp (pyrox)/P12,LI-V2.5.1.26351 Firebird 2.5/tcp (pyrox)/P12' >>> import fdb >>> con = fdb.connect(dsn='localhost:employee',user='sysdba',password='masterkey') >>> print con.db_info([fdb.isc_info_firebird_version,]) {103: 'LI-V2.5.2.26518 Firebird 2.5'} "con.db_info" I didn't knew it, it seems better for my purpose. >>> con.db_info(fdb.isc_info_firebird_version) 'LI-V2.5.1.26351 Firebird 2.5' Thanks a lot. Regards. --- Maxi