Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
how can i connet the postgersql with ruby
Vellingiri Arul
10/17/2007 5:52:00 AM
Dear friends,
Actually,I am having the lot of table in postgres.
But i need to access the table using the ruby.How could i access that
file.
how can i connet the postgersql with ruby.Plese any one tell to me.
by
vellingiri
--
Posted via
http://www.ruby-...
.
1 Answer
Vellingiri Arul
10/17/2007 8:36:00 AM
0
Vellingiri Arul wrote:
> Dear friends,
> Actually,I am having the lot of table in postgres.
> But i need to access the table using the ruby.How could i access that
> file.
> how can i connet the postgersql with ruby.Plese any one tell to me.
>
> by
> vellingiri
Dear Friends,
As per my mail I myself took risk to findout the answers.
For example,
I am having the postgresql table,In that I am having lot of table.
I want to access the particular inforamtion.
How we could do?
solution is here:
require 'postgres'
conn=PGconn.connect("fountserver",5432,'','',"vellingiri","vellingiri","vellingiri")
res=conn.exec('select * from birthday')
res.each do |row|
row.each do |column|
print column
(20-column.length).times{print " "}
end
puts
end
Note:other than that If it is there anything please tell me .
by
vellingiri
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
how can i connet the postgersql with ruby
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password