Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MS SQL Ruby Gem

I need to write a ruby script to connect to an MS SQL Server database, but all of the threads I've found point to gems to tie ActiveRecord into MS SQL. Are there any gems that will let me do this similar to pg (for postgres https://github.com/ged/ruby-pg)? I just need to do some really simple remote queries, thanks so much!

like image 580
jrushing Avatar asked Apr 12 '13 01:04

jrushing


People also ask

What is Ruby SQL?

Next Chapter: Using Non-Ruby Programs With Ruby. SQL, short for Structured Query Language is a programming language for querying and managing databases. It has its own syntax and different database systems – including Microsoft Access, MySQL, PostgreSQL, and SQLite – all have their own variations of SQL.

What is Tiny_tds?

TinyTds - A modern, simple and fast FreeTDS library for Ruby using DB-Library. The TinyTds gem is meant to serve the extremely common use-case of connecting, querying and iterating over results to Microsoft SQL Server databases from ruby.

Can Crystal Reports connect to SQL Server?

As long as compatible versions of OLE DB drivers are installed on the client computer (this is often accomplished automatically by installation of SQL Crystal Reports or another database/client application), SAP Crystal Reports will connect directly to SQL Server with no other intervention required.

Can I use Visual Studio for SQL?

You can use Visual Studio to create and update a local database file in SQL Server Express LocalDB. You can also create a database by executing Transact-SQL statements in the SQL Server Object Explorer tool window in Visual Studio.


1 Answers

The best way to do it is using the tiny_tds gem https://github.com/rails-sqlserver/tiny_tds

like image 133
rezlam Avatar answered Oct 03 '22 22:10

rezlam