Hey

I'm trying to connect to a MSSQL using ODBC. I can do so doing:

Sequel.odbc('MyODBCName') do |db|
  db[:mytable]
    .where("date = '2014-07-09'")
    .each{|row|
      puts "Doing things"
    }
end

The problem is, though, that I want to use some MSSQL specific calls, like 
nolock:

Sequel.odbc('MyODBCName') do |db|
  db[:mytable]
    .nolock
    .where("date = '2014-07-09'")
    .each{|row|
      puts "Doing things"
    }
end

This works if you use the MSSQL adapter, but not the ODBC one:

undefined method `nolock' for #<Sequel::ODBC::Dataset: "SELECT * FROM \"
mytable\""> (NoMethodError)

It looks like I need to use ODBC's MSSQL subadapter for this, but I have no 
idea how to invoke it. I tried the following (plus a couple of mutations on 
that):

Sequel.connect('odbc:mysql://MyODBCName') do |db|
  db[:mytable]
    .nolock
    .where("date = '2014-07-09'")
    .each{|row|
      puts "Doing things"
    }
end

Same issue. It doesn't look like this is the correct way to invoke a 
subadapter, though, because I can change mysql to a random string, and I'll 
still get the undefined method error.

Help?

Jrgns

-- 
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 http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to