Class: TestNIL2VT_EMPTY

Inherits:
Test::Unit::TestCase
  • Object
show all
Defined in:
tests/testNIL2VTEMPTY.rb

Instance Method Summary collapse

Instance Method Details

#setupObject



8
9
10
11
# File 'tests/testNIL2VTEMPTY.rb', line 8

def setup
  fs = WIN32OLE.new('Scripting.FileSystemObject')
  @path = fs.GetFolder(".").path
end

#test_openSchemaObject



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'tests/testNIL2VTEMPTY.rb', line 12

def test_openSchema
  con = nil
  begin
    con = WIN32OLE.new('ADODB.Connection')
    con.connectionString = "Provider=MSDASQL;Extended Properties="
    con.connectionString +="\"DRIVER={Microsoft Text Driver (*.txt; *.csv)};DBQ=#{@path}\""
    con.open
  rescue
    con = nil
  end
  if con
    rs = con.openSchema(4, [nil,nil,"DUMMY", "TABLE"])
    assert(rs)
  end
end