On Tuesday, January 31, 2017 at 2:51:18 PM UTC-8, Pedro VinÃcius wrote: > > I'm using Sequel with Tiny TDS in order to I can access MSSQL Server. The > problem is that there is a restriction on the server. I can't connect to a > specific database directly. I have to establish a connection, and so choose > a database to connect. I can't change that configuration. > > When I try to establish the connection as follows: > > Sequel.connect(adapter: 'tiny_tds', host: 'xxxxxxxxx.xxxxx.xx', port: > 0000, user: 'xxxxxxx', password: 'xxxxxxxxx') do |connection| > > end > > The code runs fine. But when I specify the database, the server returns me > an permission error. > > Is there a way of specify the database to use only after the connection > have been established? >
There isn't such a method currently. You should probably fix the permissions on the server to allow direct connection to the database. Alternatively, you could try to keep the existing working connection, and then use multilevel qualification to reference the table in the database you need: DB[Sequel[:database][:schema][:table]] Thanks, Jeremy -- You received this message because you are subscribed to the Google Groups "sequel-talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sequel-talk. For more options, visit https://groups.google.com/d/optout.
