On Thu, May 20, 2004 at 11:38:24AM +0900, Shashank Date wrote:
> That worked ... thanks a million Joao !!!

In the next minor version of Ruby/DBI, this will work:

  require 'dbi'
  dbh = DBI.connect("DBI:ODBC:driver=Microsoft Access Driver (*.mdb);dbq=c:/dbdemos")
  p dbh.tables

It's already fixed in CVS, I just need to make a release.

Regards,

  Michael

> --- Joao Pedrosa <joaopedrosa / yahoo.com> wrote:
> > 
> > Hi,
> > 
> > The first time I tested it on IRB, but I recoded it
> > to
> > a minimum. Like this:
> > 
> > require 'odbc'
> > include ODBC
> > 
> > drv = Driver.new
> > drv.name = 'Driver1'
> > drv.attrs['driver'] = 'Microsoft Access Driver
> > (*.mdb)'
> > drv.attrs['dbq'] = 'c:/dbdemos'
> > dbh = Database.new.drvconnect(drv)
> > p dbh.tables.fetch_all
> > 
> > --- output:
> > C:\>ruby dsn.rb
> > [["c:/dbdemos", nil, "MSysAccessObjects", "SYSTEM
> > TABLE", nil], ["c:/dbdemos", n
> > il, "MSysACEs", "SYSTEM TABLE", nil], ["c:/dbdemos",
> > nil, "MSysObjects", "SYSTEM
> >  TABLE", nil], ["c:/dbdemos", nil, "MSysQueries",
> > "SYSTEM TABLE", nil], ["c:/dbd
> > emos", nil, "MSysRelationships", "SYSTEM TABLE",
> > nil],
> > ["c:/dbdemos", nil, "coun
> > try", "TABLE", nil], ["c:/dbdemos", nil, "customer",
> > "TABLE", nil], ["c:/dbdemos
> > ", nil, "employee", "TABLE", nil], ["c:/dbdemos",
> > nil,
> > "items", "TABLE", nil], [
> > "c:/dbdemos", nil, "nextcust", "TABLE", nil],
> > ["c:/dbdemos", nil, "nextitem", "T
> > ABLE", nil], ["c:/dbdemos", nil, "nextord", "TABLE",
> > nil], ["c:/dbdemos", nil, "
> > orders", "TABLE", nil], ["c:/dbdemos", nil, "parts",
> > "TABLE", nil], ["c:/dbdemos
> > ", nil, "vendors", "TABLE", nil]]
> > 
> > 
> > Cheers,
> > Joao
> > 
> > 
> > 	
> > 		
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Domains ? Claim yours for only $14.70/year
> > http://smallbusiness.promotions.yahoo.com/offer 
> 
> 
> 
> 	
> 		
> __________________________________
> Do you Yahoo!?
> Yahoo! Domains ? Claim yours for only $14.70/year
> http://smallbusiness.promotions.yahoo.com/offer 
>