From: ser@... (Sean Russell) Date: 2004-02-24T05:29:48+09:00 Subject: Re: Calling JDBC from with Ruby Michael Davis wrote in message news:... > No. The data that I need to access may not always be relational and I have > been given specific requirements for using both JDBC and ODBC. I explored > many possible options for accessing data with my client and they have several > very good reasons for these requirements. Are you trying to cheat? The only reason I can think of for *requiring* an application to use JDBC is to be obtuse about *requiring* the application to be written in Java. However silly your requirements may sound, it seems to me as if you have four options: 1) Write a dumb Java application that takes two arguments: a JDBC connection string, and a SQL string. Then have it execute the query and dump the results as a [CT]SV and have your Ruby application invoke the Java app to get the data. This is really, really stupid. 2) Use JRuby to execute your application. Then you can access the JDBC API from within Ruby. This is a better solution, but your application will be that much slower, and you'll have to be careful about the places where JRuby is incomplete. 3) Implement (1), but secretly, and obtusely, use the Ruby DBI interface. 4) Shoot the person who gave you that requirement, because it is utterly stupid*. * I can think of only one case in which you *have* to use JDBC, and that would be where you happen to have a JDBC connector for a database, and one doesn't exist for DBI. Improbable, but possible. --- SER