Skip to content

Instantly share code, notes, and snippets.

@JGaudette
Created October 25, 2010 11:57
Show Gist options
  • Save JGaudette/644835 to your computer and use it in GitHub Desktop.
Save JGaudette/644835 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'dbi'
require 'odbc'
dbh = DBI.connect('DBI:ODBC:prod', 'username', 'password')
query = "select getdate()"
row = dbh.select_one(query)
puts "got a value of: " + row[0].to_s
dbh.disconnect if dbh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment