i am trying to create some JSON services for a legacy database i have in
firebird.
I have installed firebird adapter and it seems it is working but is
always throwing an error:
Fb::Error: Undefined name Dynamic SQL Error SQL error code = -204 Table
unknown MSFCLIENTES At line 1, column 45 : SELECT “MSFCLIENTES”.* FROM
“MSFCLIENTES” ORDER BY “MSFCLIENTES”.“ID” ASC ROWS 1
the log shows like if it is quering the wrong table “RDB$DATABASE” (one
of the system tables), so if i change the table name to that table it
works but it isnt the table i need…
here is my model
class Client < ActiveRecord::Base
establish_connection(
:adapter => “fb”,
:database => “localhost:/var/databases/MSFBASE.Ib”,
#:database => “sales”,
:username => “SYSDBA”,
:password => “masterkey”,
:charset => “NONE”)
self.table_name = “MSFCLIENTES”
#self.primary_key = ‘RDB$RELATION_ID’
#self.table_name = “RDB$DATABASE”
#self.primary_key = ‘RDB$RELATION_ID’
self.table_name = ‘employee’
end