You can clone with
HTTPS or Subversion.
The following connects successfully to the database:
DB = Sequel.connect(
:adapter => "tinytds",
:username => 'sa',
:password => 'Doric101',
:host => '192.168.4.235',
:database => 'ADCData_Doric'
Running manual SQL queries works but the code here:
prm_master__employee = DB.from(:prm_master__employee)
prm_master__employee.each do |r|
results in the error:
/Users/lukeholder/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sequel-3.41.0/lib/sequel/adapters/tinytds.rb:221:in `fields': TinyTds::Error: Invalid object name 'PRM_MASTER.EMPLOYEE'. (Sequel::DatabaseError)
from /Users/lukeholder/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sequel-3.41.0/lib/sequel/adapters/tinytds.rb:221:in `block in fetch_rows'
from /Users/lukeholder/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/sequel-3.41.0/lib/sequel/adapters/tinytds.rb:68:in `block in execute'
Obviously the tinytds adadper is looking for a table PRM_MASTER.EMPLOYEE but the table does not have a dot.
Any assistance would be appreciated.
ok, looking at documentation further, the double underscore is actually a notation created as a part of the Qualifying identifiers of sequel. Any way around this, as the table cannot be renamed to not contain double underscores?
I tried this which should be a valid symbol but it doesn't work either:
I suppose what I am asking is a way to use double underscores in a table name without it thinking im looking to make it a qualified query.
class Employees < Sequel::Model(:prm_master__employee)
but Employee.all fails with
Invalid object name 'PRM_MASTER.EMPLOYEE'
issue solved with