From: Coey_Minear@... Date: 2009-10-28T01:31:05+09:00 Subject: Re: SQL Shell for MS Access > -----Original Message----- > From: paulsmithenator@gmail.com [mailto:paulsmithenator@gmail.com] > On Behalf Of Paul Smith > Sent: Tuesday, October 27, 2009 8:18 AM > To: ruby-talk ML > 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&g > l=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&s > ig=-Vk-Jpfm0f_LlS5z- > AaCKw67NGU&hl=en&ei=8MzmSpmeLZXSjAediLW1CA&sa=X&oi=book_result&ct=r > esult&resnum=1&ved=0CA4Q6AEwAA#v=onepage&q=&f=false > According to this page: http://ruby-dbi.rubyforge.org/git?p=ruby-dbi.git;a=commit;h=556e08726d9716e5b06d558b8250eb9f0d06df9e 'sqlsh.rb' was renamed to 'dbi'. You should find a 'dbi' file in the same directory where 'ruby' is installed. Of course, there have been changes to 'dbi' since this change was made, but it's a place to start. > > > > 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 Coey Minear