From: davem1957@... (David Moore) Date: 2002-11-29T22:36:51+09:00 Subject: Re: exerb "Shannon Fang" wrote in message news:... > hi > > anyone used exerb? I tired with my program it worked fine. However, if I use > ODBC in my program, the created exe doesn't work. I guess it don't know > where to look for odbc.o... Any suggestion? > I had the same problem. I worked around it on my windows system by using ADO and Win32OLE. Here is a little sample code. require "win32ole" # the Ado com object ID string ADO_OBJECT1 = 'ADODB.Connection' ADO_OBJECT2 = 'ADODB.RecordSet' CONNSTR = 'Your DSN' TESTTABLE1 = 'Your Table Name' SAMPLEFIELD = 'Your Field' # stop after MAX_RECS = 100 def adoTest1() # instantiate handle = WIN32OLE.new(ADO_OBJECT1) # invoke Ado handle.Open(CONNSTR) sql = "SELECT TOP #{MAX_RECS} * FROM #{TESTTABLE1}" puts sql recordSet = handle.Execute(sql) # iterate data-set while !recordSet.EOF index = 0 # access the fields collection theName = recordSet.Fields(index).Name() theSize = recordSet.Fields(index).ActualSize() print "Field #{index}(#{theName}) is size #{theSize}\n" theValue = recordSet.Fields().Item(SAMPLEFIELD).Value() print "Value of #{SAMPLEFIELD} is #{theValue}\n" recordSet.moveNext end handle.Close() end