From: Radek Hnilica Date: 2002-07-10T17:48:48+09:00 Subject: Re: How to connect to sql host using dbi In article <20020709185451.GE62567@ninja1.internal>, Sean Chittenden wrote: > You were very close: > > #!/usr/bin/env ruby > # $Id$ > require 'dbi' > DBI.connect('DBI:Pg:testdb;sql', nil, nil) do |dbh| > puts "selecting..." > end this doesn't work to. After some experimenting I come with this code which works. It means it doesn't fail. The data fetch will be tested in near future. --->code<--- #!/usr/bin/env ruby # $Id: list_records.rb,v 1.1 2002/07/09 14:48:41 radek Exp $ require 'dbi' DBI.connect('DBI:Pg:dbname=testdb;host=sql', 'radek') do |dbh| puts "selecting..." end --->end code<--- -- Radek Hnilica ======================================= No matter how far down the wrong road you've gone, turn back. Turkish proverb