TinyTDS is a Ruby library to access Microsoft SQL Server databases using FreeTDS.
Questions tagged [tiny-tds]
149 questions
4
votes
3 answers
Unable to `gem install tiny_tds` OS X Mavericks
The Error
$ sudo gem install tiny_tds
Building native extensions. This could take a while...
ERROR: Error installing tiny_tds:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby…

abc123
- 17,855
- 7
- 52
- 82
4
votes
1 answer
tiny_tds: Segmentation fault
This is similar to this question. However, the answer posted on that question, didn't work for me. I have installed freetds on my Mac. I have specified the following in my GemFile.
gem 'tiny_tds'
gem 'activerecord-sqlserver-adapter', '~> 4.1.0'
And…

Indrajeet
- 521
- 3
- 9
- 23
4
votes
1 answer
Does TinyTDS support Ruby 2.0.0?
I am having real trouble trying to get TinyTDS working with Ruby 2.0.0 on Windows 7.
When i run a rails c (or require tiny_tds from an irb), i get the…

rwb
- 4,309
- 8
- 36
- 59
4
votes
1 answer
How do I reference a tiny_tds connection in ruby/sinatra via database.yml (or other)?
I'm trying to figure out how to pull data from a database without the need to place a connection string at the top of each ruby file.
I'm learning the basics of ruby via a little Sinatra app I'm putting together which pulls data from a MSSQL…

lad33
- 65
- 6
4
votes
1 answer
An established connection was aborted by the software in your host machine
I am fetching data using tiny tds. While fetching am getting following error. Am not using eclipse. Am using Mongrel server + Windows
Read error: #

Ashwini
- 2,449
- 2
- 29
- 42
4
votes
0 answers
TinyTds::Error: Adaptive Server connection failed
This is an odd one. I have some ruby code on my machine which uses the tiny_tds version:
0.6.0.rc1
and everything works fine. When a co-worker attempt to run the same code he gets the following error:
TinyTds::Error: Adaptive Server connection…

user1904593
- 171
- 3
- 10
3
votes
0 answers
Tiny TDS load error whilst running rails server
I get this error message when I run "rails server"
C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/activesupport-3.2.1/lib/active_support/dependencies.rb:251:in `require': cannot load such file -- tiny_tds (LoadError)
I have ruby-odbc 0.99994…

user1126946
- 205
- 1
- 7
- 17
3
votes
3 answers
How to insert a file into sql-server via tiny_tds?
In a data importing script:
client = TinyTds.Client.new(...)
insert_str = "INSERT INTO [...] (...) VALUE (...)"
client.execute(insert_str).do
So far so good.
However, how can I attach a .pdf file into the varbinary field (SQL Server 2000)?

ohho
- 50,879
- 75
- 256
- 383
3
votes
2 answers
Can´t install tiny_tds in Windows 10
When I run:
gem install tiny_tds
The output tells me that I need FreeTDS installed. Next, it shows me some configuration options and that I'll probably need an option. The options are the following:
--with-opt-dir
--without-opt-dir
…

Matías Leandro
- 49
- 7
3
votes
2 answers
Unable to install tiny_tds on mac
I am trying to set up a new mac and have been unable to get tiny_tds to compile. I am running OSX Mojave (10.14.6) and have ruby 2.4.5 installed via asdf. When I try to bundle, installing tiny_tds fails and the logs show:
Undefined symbols for…

Chad
- 768
- 1
- 6
- 20
3
votes
0 answers
Ruby TinyTds Hang on Result.each line
I have the following code:
def self.GetValuesFromDB(dataServer,database,sqlString)
mprids = Array.new
dbResult = Helper.CallDB(dataServer,database,sqlString)
client = TinyTds::Client.new(:dataserver => dataServer, :database => database,…

user1904593
- 171
- 3
- 10
3
votes
1 answer
Using SSPI with Ruby TinyTDS - possible?
After some anguish trying to connect to a SQLServer database with Ruby, I finally discovered TinyTDS and it's fantastic.
However, it requires a username and password to talk to the database. In C# tests in the past, we've used SSPI to supply…

Mark Mayo
- 12,230
- 12
- 54
- 85
3
votes
2 answers
Tiny_tds: Connect: Server name not found in the configuration files
require "rubygems"
require "tiny_tds"
client = TinyTds::Client.new(:username => 'sa', :password => '', :host => 'RICHARD_PC\SQLEXPRESS')
result = client.execute("SELECT * FROM [Contacts]")
result.each do |row|
//Do something
end
I keep…

Richard77
- 20,343
- 46
- 150
- 252
2
votes
0 answers
ArgumentError (invalid byte sequence in UTF-8)
In my Rails 3.1 application (runs on Ubuntu 11.10) , I am using tiny-tds, sqlserver active record adapter. My default database is mysql but I also connect to SqlServer 2005 for business logic. When I connect to sql server 2005 and query the database…

Murat Güzel
- 4,986
- 4
- 19
- 12
2
votes
1 answer
TinyTds::Error: Cannot insert the value NULL into column 'ID'
My Ruby on Rails system is moving from Oracle to Microsoft SQL Server 2012. The back end database has already been converted by a third part from Oracle to Microsoft SQL Server. I have no control over the schema structure. This cannot be…

user321321
- 21
- 1