29 Jul '15, 5pm

How to connect to an #Azure SQL #Database by using Ruby on Mac OS X (Yosemite): #documentation

require 'tiny_tds' client = TinyTds::Client.new username: '[email protected]', password: 'yourpassword', host: 'yourserver.database.windows.net', port: 1433, database: 'AdventureWorks', azure:true results = client.execute("SET ANSI_NULLS ON") results = client.execute("SET CURSOR_CLOSE_ON_COMMIT OFF") results = client.execute("SET ANSI_NULL_DFLT_ON ON") results = client.execute("SET IMPLICIT_TRANSACTIONS OFF") results = client.execute("SET ANSI_PADDING ON") results = client.execute("SET QUOTED_IDENTIFIER ON") results = client.execute("SET ANSI_WARNINGS ON") results = client.execute("SET CONCAT_NULL_YIELDS_NULL ON") require 'date' t = Time.now curr_date = t.strftime("%Y-%m-%d %H:%M:%S.%L") results = client.execute("INSERT SalesLT.Product (Name, ProductNumber, StandardCost, ListPrice, SellStartDate) OUTPUT INSERTED.ProductID VALUES ('SQL Server Express New', 'SQLEXPRESS...

Full article: https://azure.microsoft.com/en-us/documentation/articles/...

Tweets