blob: aa6c9c7e3a56e90336f4987188ac5262ee7c88a6 (
plain)
1
2
3
4
5
6
7
8
9
10
|
# frozen_string_literal: false
require 'win32ole'
db = WIN32OLE.new('ADODB.Connection')
db.connectionString = "Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=.;"
ev = WIN32OLE_EVENT.new(db)
ev.on_event('WillConnect') {|*args|
foo
}
db.open
WIN32OLE_EVENT.message_loop
|