Subject | Re: [firebird-python] fdb: error on get server version info |
---|---|
Author | Maximiliano Robaina |
Post date | 2012-09-24T14:07:38Z |
Hi Philippe,
De: Philippe Makowski <pmakowski@...>
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] :
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.db_info" I didn't knew it, it seems better for my purpose.
Thanks a lot.
Regards.
---
Maxi
De: Philippe Makowski <pmakowski@...>
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] :
>Version is a string, not an integer
> 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?
>
>>> import fdb.services as fbserviceLI-V2.5.2.26518 Firebird 2.5
>>> svc = fbservice.connect(host='localhost',password='masterkey')
>>> print svc.getServerVersion()
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 fdbfdb.connect(dsn='localhost:employee',user='sysdba',password='masterkey')
>>> con =
>>> 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