Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'tiny_tds'
- require 'csv'
- ## Connect to database
- client = TinyTds::Client.new username: 'ISO_AVM', password: '<db-password>', host: '<hostname or IP>', port: 1433, database: 'ISO_AVM2'
- if client.active?
- puts 'Connection successful!'
- end
- ## Open and readCSV file
- CSV.foreach("/home/jonas/RubymineProjects/ISO-AVM/test.csv") do |row|
- puts row.inspect
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement