?set_encoding=None should have the effect of not running "SET NAMES"
The other problem you have is that "password' cannot be used a field name by auth because it is a reserved in firebird. auth.settings.password_field='password2' before auth.define_tables() Massimo On Jun 22, 9:42 am, Alexei Vinidiktov <alexei.vinidik...@gmail.com> wrote: > Thanks for your input, Jose. > > As I said earlier, I had tried commenting the lines that add SET NAMES > in sql.py, and I got a different error message that I quoted in a > previous email. Part of the traceback was: > > 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\')' > > And the solution Massimo suggested didn't work either which I also > reported in a previous email. > > > > On Mon, Jun 22, 2009 at 10:36 PM, Jose<jjac...@gmail.com> wrote: > > > On 22 jun, 02:54, Alexei Vinidiktov <alexei.vinidik...@gmail.com> > > 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 > > > This had commented on it to Massimo, the instruction : > > SET NAMES > > It is not valid in firebird. > > > Jose > > -- > 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 web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---