[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

How to get a connection with an existent database?

Ignacio Giagante

6/12/2008 2:32:00 PM

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 :)
--
Posted via http://www.ruby-....

3 Answers

Glen Holcomb

6/12/2008 2:44:00 PM

0

[Note: parts of this message were removed to make it a legal post.]

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 :)
> --
> Posted via http://www.ruby-....
>
>
You could always use the SQLite gem (http://sqlite-ruby.ruby...)

--
"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)

Ignacio Giagante

6/13/2008 7:32:00 AM

0

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 :)
>> --
>> Posted via http://www.ruby-....
>>
>>
> You could always use the SQLite gem (http://sqlite-ruby.ruby...)
>
> --
> "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-....

Phillip Gawlowski

6/13/2008 2:14:00 PM

0

-----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.bl...

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....

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