J
Junkone
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
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