require 'phi'; include Phi
require 'rdb'; include RDB
require 'com' # CoInitialize

form = Form.new

conn = ADOConnection.new
conn.connection_string = 'File Name=TEST.UDL'
conn.login_prompt = false
conn.connected = true

table = ADOTable.new
table.connection = conn
table.cursor_type = CT_STATIC
table.table_name = '得意先'
table.active = true

data_source = DataSource.new
data_source.data_set = table

grid = DBGrid.new form
grid.data_source = data_source
grid.align = AL_CLIENT

form.show

# 接続を解除してみる
table.connection = nil
conn.connected = false

Phi.mainloop
