How to get a connection with an existent database?

Can somebody say me how to read an existent database with sqlite and
ruby? I want to know, how to get the connection and then close it.

Thanks :slight_smile:

···

--
Posted via http://www.ruby-forum.com/.

You could always use the SQLite gem (http://sqlite-ruby.rubyforge.org/\)

···

On Thu, Jun 12, 2008 at 8:32 AM, Ignacio Giagante <peyisar@gmail.com> wrote:

Can somebody say me how to read an existent database with sqlite and
ruby? I want to know, how to get the connection and then close it.

Thanks :slight_smile:
--
Posted via http://www.ruby-forum.com/\.

--
"Hey brother Christian with your high and mighty errand, Your actions speak
so loud, I can't hear a word you're saying."

-Greg Graffin (Bad Religion)

Glen Holcomb wrote:

···

On Thu, Jun 12, 2008 at 8:32 AM, Ignacio Giagante <peyisar@gmail.com> > wrote:

Can somebody say me how to read an existent database with sqlite and
ruby? I want to know, how to get the connection and then close it.

Thanks :slight_smile:
--
Posted via http://www.ruby-forum.com/\.

You could always use the SQLite gem (http://sqlite-ruby.rubyforge.org/\)

--
"Hey brother Christian with your high and mighty errand, Your actions
speak
so loud, I can't hear a word you're saying."

-Greg Graffin (Bad Religion)

I ve looked teh SQLite gem, but there don´t say how to get a connection
with an existent database. All time it´s creating the database... :(.
--
Posted via http://www.ruby-forum.com/\.

Ignacio Giagante wrote:

I ve looked teh SQLite gem, but there don´t say how to get a connection
with an existent database. All time it´s creating the database... :(.

Then you didn't look close enough. If the file/db doesn't exist, it will
be created. Otherwise, the SQLite gem will use the existing database.

- --
Phillip Gawlowski
Twitter: twitter.com/cynicalryan
Blog: http://justarubyist.blogspot.com

10 years ago I was so ignorant, I didn't even know who the
Prime Minister of America was.