Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > keep gettting errors using Sequel ODBC::Error: 37000 (170)

Reply
Thread Tools

keep gettting errors using Sequel ODBC::Error: 37000 (170)

 
 
Junkone
Guest
Posts: n/a
 
      05-25-2011
i am trying to connect to MSSQL server from xP


i have the following problem for any sql. pl help
ODBC::Error: 37000 (170) [Microsoft][ODBC SQL Server Driv
er][SQL Server]Line 1: Incorrect syntax near '1'.



D:\Documents and Settings\>irb
irb(main):001:0> require 'odbc'
=> true
irb(main):002:0> require 'Sequel'
=> true
<c('LPM', :user=>'resum', assword=>'ms_0416')
=> #<Sequel::ODBC:atabase: "odbc:resum:ms_04166@/LPM">
irb(main):004:0> require 'rubygems'
=> false
irb(main):005:0>
a=Sequel.odbc('LPM', :user=>'resum', assword=>'ms_04166>
=> #<Sequel::ODBC:atabase: "odbc:resum:ms_0416@/LPM">
irb(main):007:0> a.connect('LPM')
=> #<ODBC:atabase:0x2d54990>
irb(main):008:0> a.tables
Sequel::NotImplemented: #tables should be overridden by adapters
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/database
/query.rb:185:in `tables'
from (irb):8
irb(main):009:0>
ds=Sequel.odbc('LPM', :user=>'resum', assword=>'ms_0416>
=> #<Sequel::ODBC:atabase: "odbc:resum:ms_04166@/LPM">
irb(main):010:0> ds.connect('LPM')
=> #<ODBC:atabase:0x35e5e10>
irb(main):011:0>
DB=Sequel.odbc('LPM', :user=>'resum', assword=>'ms_0416>
=> #<Sequel::ODBC:atabase: "odbc:resum:ms_04166@/LPM">
irb(main):012:0> DB.connect('LPM')
=> #<ODBC:atabase:0x35ae1c0>
irb(main):013:0> ds=DB[roblemTable]
=> #<Sequel::ODBC:ataset: "SELECT * FROM \"PROBLEMTABLE\"">
irb(main):014:0> ds.count
Sequel:atabaseError: ODBC::Error: 37000 (170) [Microsoft][ODBC SQL
Server Driv
er][SQL Server]Line 1: Incorrect syntax near '1'.
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/adapters
/odbc.rb:52:in `run'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/adapters
/odbc.rb:52:in `execute'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/database
/logging.rb:28:in `log_yield'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/adapters
/odbc.rb:52:in `execute'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/connecti
on_pool/threaded.rb:84:in `hold'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/database
/connecting.rb:226:in `synchronize'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/adapters
/odbc.rb:50:in `execute'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/dataset/
actions.rb:541:in `execute'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/adapters
/odbc.rb:92:in `fetch_rows'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/dataset/
actions.rb:123:in `each'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/dataset/
actions.rb:449:in `single_record'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/dataset/
actions.rb:457:in `single_value'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/dataset/
actions.rb:202:in `get'
from C:/Ruby187/lib/ruby/gems/1.8/gems/sequel-3.23.0/lib/
sequel/dataset/
actions.rb:96:in `count'
from (irb):14
from :0
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gettting xml column data Ameur ASP .Net Web Services 2 11-20-2008 06:33 PM
ANN: Sequel 0.0.19 Released and Sequel discussion list Sharon Rosner Ruby 0 04-16-2007 09:48 AM
Please help! Why am I gettting 15000 emails???? gaiami1@tds.net Computer Support 6 12-04-2006 10:37 PM
Gettting started Sean MCDST 3 03-11-2005 02:16 PM
trouble gettting to certain web pages mvccerase Computer Support 1 10-22-2004 04:18 AM



Advertisments