Questions tagged [tiny-tds]

TinyTDS is a Ruby library to access Microsoft SQL Server databases using FreeTDS.

149 questions
0
votes
1 answer

Cannot install tiny_tds on os.x 10.9.4

I'm trying to install tiny_tds on a mac running OS.X Mavericks but I receive the following error: ERROR: Error installing tiny_tds: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby…
Marius
  • 3,253
  • 5
  • 25
  • 29
0
votes
2 answers

Connect to sqlserver from heroku

i have a remote SQLSERVER instance wich i want to connect from my rails app hosted on heroku. My gemfile: gem 'activerecord-sqlserver-adapter', '~> 3.2.12' gem 'tiny_tds' database.yml production: adapter: sqlserver mode: dblib dataserver:…
0
votes
2 answers

Rails Concurrency Issue With MS SQL While Storing Incremental Values in DB

I am running an application that uses rails 3.2.3 and sits on top of an instance of MS SQL Sever using tinyTDS to connect. The application is multithreaded using unicorn to have 4 processes. The issue is that the application uses a field in the…
0
votes
1 answer

Sequel many_to_one association failing with "Conversion failed" when using an alphanumeric key

I'm working with an existing MSSQL database to which I have little to no control over as it's a legacy application built by others. I'm attempting to associate two tables in a one_to_many association. Here's the code snippet which defines the…
Donovan
  • 15,917
  • 4
  • 22
  • 34
0
votes
1 answer

TinyTDS Undefined symbol dbsetluser

I've been struggling for the last couple of days with this issue and I'm out of ideas. I am working on a somewhat out of date application, in which I now need to add support for SQL Server. I have managed to get it to work locally (Ubuntu 12.04),…
Ruy Diaz
  • 3,084
  • 24
  • 36
0
votes
1 answer

Ruby code throwing Exception in Rufus Scheduler

I am executing a controller on debian linux which performs a functionality in a infinite loop. Along with this I am using Rufus Scheduler to schedule a function which runs after a specific amount of time lets say 1 min. Once the functions executes…
Hamad Salahuddin
  • 1,097
  • 2
  • 8
  • 11
0
votes
1 answer

Ordering a Sequel dataset with subquery and limit with offset

I've run into an odd problem when trying to order a dataset based on the results of a subquery. It works fine until I try to add a limit with an offset, then I get an error saying that the sort column name is invalid. Here's a debugger session that…
bundacia
  • 1,036
  • 5
  • 13
0
votes
1 answer

SqlServer: Conversion failed when converting from a character string to uniqueidentifier

User.where('user_id not in (?)', CancelledUser.all.collect(&:id).join(', ')) Above query gives me the following error when there are no cancelled users. ActiveRecord::StatementInvalid: TinyTds::Error: Conversion failed when converting from a…
usha
  • 28,973
  • 5
  • 72
  • 93
0
votes
1 answer

Rake Tasks With Tiny_TDS

I'm trying to access some data from our on-site billing server to be populate into a rails app that i'm deploying. I've done some digging about and think Tiny TDS and a rake task is the best way to go but I seem to be getting a bit stuck. The code…
Freddy Wetson
  • 456
  • 1
  • 4
  • 23
0
votes
1 answer

How to specify DATETIME format for a database connection?

Currently I connect to a MSSQL database by activerecord-sqlserver-adapter on top of dbd-odbc and tiny_tds. INSERT is working, except for DATETIME field. The datetime field returned from a SELECT: rows =…
ohho
  • 50,879
  • 75
  • 256
  • 383
0
votes
1 answer

Getting values of raw SQL call from Rails

I have this little bit of code info in the controller: @today_date = Time.current.to_date.strftime('%Y%m%d') client = TinyTds::Client.new(:username => 'tr', :password => 'tr', :host => 'xxx.xxx.xxx.xxx', :database => 'KTrade') data =…
Alexey
  • 3,607
  • 8
  • 34
  • 54
0
votes
1 answer

Rails: db:migrate wont make changes to database table (tinytds)

I'm using tinytds to connect to a ms-sqlserver database. I've noticed that db:migrate will work as long as there isn't a table already in my database. Once I try to make changes to an object and replicate to the database using db:migrate I get the…
daveomcd
  • 6,367
  • 14
  • 83
  • 137
0
votes
1 answer

Ruby SQL Server and Do blocks

I have the following code: sql = "select Board_Name AS 'Board Name', COUNT(Board_Name) AS 'Count' from dbo.TABLE GROUP BY Board_Name" result = client.execute(sql) result.each do |row| binfo = [ label: row['Board Name'], value: row['Count'] ] …
omiba
  • 3
  • 2
-1
votes
1 answer

Rails 5 - Connectivity issue with MS SQL 2008

I am trying to build a ROR app with Ruby 2.3.3 and Rails 5.0.1 but when connecting to SQl server 2008 I am getting an error which says TinyTDS::Error (Adaptive server connection failed) I am using the latest version of tiny_tds gem (1.3.0) and…
1 2 3
9
10