TinyTds::Error: Adaptive Server connection failed

957 views
Skip to first unread message

jyan...@gmail.com

unread,
Aug 28, 2014, 12:02:09 PM8/28/14
to rails-sqlse...@googlegroups.com
Hi,

I'm using Rails 4.1.4, FreeTds 9.1 and TinyTds 0.6.2.

database.yml -
  adapter: sqlserver
  timeout: 5000
  host: host
  port: 2025
  username: my_name
  password: some_password
  ds_version: 100
  encoding: iso_1
  database: labs

It gives me an error TinyTds::Error: Adaptive Server connection failed when I try to access the tables in labs in rails console. 

Nevertheless, everything works perfectly in rails console when I create a client as 
client = TinyTds::Client.new(:username => 'my_name', :password => 'some_password', :host => 'host', :port => '2025', :tds_version => 100)

Any ideas? 

Thanks in advance,
Jessie

KLausG

unread,
Sep 2, 2014, 8:03:38 AM9/2/14
to rails-sqlse...@googlegroups.com
So the main difference I see is the "encoding: iso_1" entry in database.yml. Have you tried to remove it?

Anna Carey

unread,
Sep 2, 2014, 10:37:12 AM9/2/14
to rails-sqlse...@googlegroups.com
Is it just that you’re using “ds_version” rather than “tds_version”?
--
You received this message because you are subscribed to the Google Groups "Rails SQLServer Adapter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails-sqlserver-a...@googlegroups.com.
To post to this group, send email to rails-sqlse...@googlegroups.com.
Visit this group at http://groups.google.com/group/rails-sqlserver-adapter.
For more options, visit https://groups.google.com/d/optout.

jyan...@gmail.com

unread,
Sep 2, 2014, 10:50:03 AM9/2/14
to rails-sqlse...@googlegroups.com
Thanks for your response. Yes I tried to remove it and it does not work still. 

jyan...@gmail.com

unread,
Sep 2, 2014, 10:54:29 AM9/2/14
to rails-sqlse...@googlegroups.com
Thanks for your response. I fixed the typo and now it connects to the server I think. But is giving me another error when I try to execute a select query:

TinyTds::Error: MYTABLENAME not found. Specify owner.objectname or use sp_help to check whether the object exists (sp_help may produce lots of output).


This does not happen when I establish a separate connection to the database and execute a query. EX:
client = TinyTds::Client.new(:username => 'my_name', :password => 'some_password', :host => 'host', :port => '2025', :tds_version => 100)

result = client.execute("select * from lab")



On Tuesday, September 2, 2014 10:37:12 AM UTC-4, Anna Carey wrote:
Is it just that you’re using “ds_version” rather than “tds_version”?
On Aug 28, 2014, at 12:02 PM, jyan...@gmail.com wrote:

Hi,

I'm using Rails 4.1.4, FreeTds 9.1 and TinyTds 0.6.2.

database.yml -
  adapter: sqlserver
  timeout: 5000
  host: host
  port: 2025
  username: my_name
  password: some_password
  ds_version: 100
  encoding: iso_1
  database: labs

It gives me an error TinyTds::Error: Adaptive Server connection failed when I try to access the tables in labs in rails console. 

Nevertheless, everything works perfectly in rails console when I create a client as 
client = TinyTds::Client.new(:username => 'my_name', :password => 'some_password', :host => 'host', :port => '2025', :tds_version => 100)

Any ideas? 

Thanks in advance,
Jessie


--
You received this message because you are subscribed to the Google Groups "Rails SQLServer Adapter" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rails-sqlserver-adapter+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages