Chris Morris wrote:
> > I want to access a MSAccess database with Ruby. I'm new to databases and
> > Ruby, so my question is quite basic.
> >
> > When I try to connect to the database with DBI a error message shows up. I
> > have no idea if there is something wrong with my code or my system
> > configuration. Perhaps someone can provide a working code fragment?
> >
> > Environment:
> > Windows ME, MSAccess not installed
> 
> You do not have to have Access installed, just the MDAC that includes
> ODBC/ADO, depending on how you connect.
> 
> I access Access (ha) through win32ole -> ADO -- so I can't help you with the
> DBI specifics.
> 
> > Error:
> > C:/PROGRAMME/RUBY/lib/ruby/site_ruby/1.7/DBD/ODBC/ODBC.rb:71:in `connect':
> > S1090 (0) [Microsoft][ODBC Driver Manager] Ung?ltige Zeichenfolgen- oder
> > Pufferl?nge. (DBI::DatabaseError)
> >  from C:/PROGRAMME/RUBY/lib/ruby/site_ruby/1.7/dbi/dbi.rb:496:in `connect'
> >  from C:/PROGRAMME/RUBY/lib/ruby/site_ruby/1.7/dbi/dbi.rb:322:in `connect'
> 
> Also, if you have the ability to post an English ODBC error msg, I might be
> able to help more.

In English:

"Invalid character string or buffer length"

Seems like an syntax error in the DSN or something alike (perhaps the path name?).


Regards,

  Michael