How to get a connection with an existent database?

I

Ignacio Giagante

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 :)
 
I

Ignacio Giagante

Glen said:
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... :(.
 
P

Phillip Gawlowski

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhSgNoACgkQbtAgaoJTgL+OUwCfZg6AXyZsuxr0BIfr7pA2YerE
nDAAn0/KwODgsSEsOfyMVX1UcxXxPtC1
=De9U
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,202
Messages
2,571,057
Members
47,666
Latest member
selsetu

Latest Threads

Top