From: Paul Smith Date: 2009-10-27T22:18:08+09:00 Subject: Re: SQL Shell for MS Access On Tue, Oct 27, 2009 at 1:01 PM, Robert Klemme wrote: > 2009/10/27 Paul Smith : >> What I want is an SQL command prompt allowing me to run SQL queries >> against an Access .mdb. >> >> I thought that Ruby/DBI included a sqlsh.rb script that essentially >> did this, but no matter how I install Ruby/DBI I can't find the SQL >> shell that I want. >> >> So - does Ruby/DBI even include an SQL shell anymore?  Is there >> another way to get an SQL prompt for MS Access in a similar way to >> what you can do with mysql for example? > > I doubt Ruby/DBI ever included what you need.  In order to be able to > directly run SQL against an mdb file you need any DB engine.  Ruby/DBI > is just an interfacing layer and does not include anything like a > complete DB engine. Well, to be more complete, Ruby/DBI using a ruby-odbc DBD to connect out to an access database. This cached page http://209.85.229.132/search?q=cache:oks0dAPyNbQJ:doc.gnu-darwin.org/dbi/html/+ruby/dbi+sql+command+line&cd=9&hl=en&ct=clnk&gl=uk&client=firefox-a suggests that sqlsh.rb did indeed once exist. Page 137, Chapter 3 of "Accessing Databases with Ruby" also describes what I want - http://books.google.co.uk/books?id=SvTuCXEKBvkC&pg=PA137&lpg=PA137&dq=ruby+ms+access+interactive+sql+client&source=bl&ots=SPgHkn7a76&sig=-Vk-Jpfm0f_LlS5z-AaCKw67NGU&hl=en&ei=8MzmSpmeLZXSjAediLW1CA&sa=X&oi=book_result&ct=result&resnum=1&ved=0CA4Q6AEwAA#v=onepage&q=&f=false > > Having said that, you can use OpenOffice to open mdb files and also > execute queries against it. Maybe this is the right way to go, I just really like the command line, as I'm used to working with mysql, and there you can just fire up mysql-client, get a mysql> prompt, and start typing things like show tables to list all the tables in the db, desc table to describe the layout of a given table. I'm just trying to make working with MS Access feel more like working with mysql :) -- Paul Smith http://www.nomadicfun.co.uk paul@pollyandpaul.co.uk