[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
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-....