I've also tried commenting the lines
if charset != 'None':
self._execute('SET NAMES %s;' % charset)
in sql.py but then I got this error message:
Traceback (most recent call last):
File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/restricted.py",
line 107, in restricted
exec ccode in environment\n File
"/var/www/alvinru/data/www/bilingsoft.ru/applications/welcome/models/db.py",
line 57, in <module>
auth.define_tables() # creates all needed tables
File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/tools.py", line
504, in define_tables
migrate=self.__get_migrate(self.settings.table_user_name, migrate))
File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/sql.py", line
993, in define_table
query = t._create(migrate=migrate)
File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/sql.py", line
1314, in _create
self._db._execute(query)\n File
"/var/www/alvinru/data/www/bilingsoft.ru/gluon/sql.py", line 864, in
<lambda>
self._execute = lambda *a, **b: self._cursor.execute(*a, **b)
ProgrammingError: (-104, \'isc_dsql_prepare: Dynamic SQL Error SQL
error code = -104
Token unknown - line 6, column 2 password\')'
On Mon, Jun 22, 2009 at 2:08 PM, Alexei
Vinidiktov<[email protected]> wrote:
> Now I receive an error message that says:
>
> "'isc_attach_database: I/O error for file "employee.fdb?set_encoding=None"
> Error while trying to open file. No such file or directory'"
>
> On Mon, Jun 22, 2009 at 1:18 PM, mdipierro<[email protected]> wrote:
>>
>> Use this string instead. It seems some version is Firbird do not like
>> setting the default encoding to UTF8.
>>
>> db = SQLDB('firebird://sysdba:passw...@localhost/employee.fd?
>> set_encoding=None')
>>
>>
>> On Jun 21, 9:54 pm, Alexei Vinidiktov <[email protected]>
>> wrote:
>>> Hello,
>>>
>>> I'm trying to make a connection to a Firebird db file, but I keep
>>> getting this error:
>>>
>>> Traceback (most recent call last):
>>> File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/restricted.py",
>>> line 98, in restricted
>>> exec ccode in environment
>>> File
>>> "/var/www/alvinru/data/www/bilingsoft.ru/applications/notebook/models/db.py",
>>> line 12, in <module>
>>> db = SQLDB(\'firebird://sysdba:passw...@localhost/employee.fdb\')
>>> File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/sql.py", line
>>> 837, in __init__
>>> self._execute(\'SET NAMES %s;\' % charset)
>>> File "/var/www/alvinru/data/www/bilingsoft.ru/gluon/sql.py", line
>>> 835, in <lambda>
>>> self._execute = lambda *a, **b: self._cursor.execute(*a,**b)
>>> ProgrammingError: (-104, \'isc_dsql_prepare: Dynamic SQL Error SQL
>>> error code = -104
>>> Token unknown - line 1, column 5 NAMES\')'
>>>
>>> My connection string in db.py is like this:
>>>
>>> db = SQLDB('firebird://sysdba:passw...@localhost/employee.fdb')
>>>
>>> I can successfully connect to the same database from the command line:
>>>
>>> import kinterbasedb
>>> con = kinterbasdb.connect(
>>> host='localhost', database='employee.fdb',
>>> user='sysdba', password='password'
>>> )
>>>
>>> I'm using CentOS 5.2 with Python 2.5.4, Firebird 2.1.2 Super Server
>>> and the latest version of web2py.
>>>
>>> I'd be grateful for any clues as to what might be happening.
>>>
>>> --
>>> Alexei Vinidiktov
>> >>
>>
>
>
>
> --
> Alexei Vinidiktov
>
--
Alexei Vinidiktov
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---