From: Sabyasachi Mustafi Date: 2003-11-17T17:54:01+09:00 Subject: Re: mysql and ruby 1.8 --Next_1069059200---0-202.54.124.152-28271 Content-type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline You may try this. =0A1. You have to connect to Mysql with dbh=0A2. Then pre= pare, execute and fetch=0A=0AFollowing is a method from our project in the = PHED department (Govt. of West Bengal, India) =0A=0Adef take_blockname #MET= HOD FOR TAKE BLOCK NAME FROM THE TABLE BLOCK=0A dbh =3D DBI.connect($va= rDataBase,$varUser,$varPass)=0A=0A #dbh =3D DBI.connect('dbi:Mysql:PHE1:= 100.100.100.1','test','')=0A sql =3D "SELECT block_name FROM BLOCK where= dcode =3D '#{$blockDCode}';"=0A #print sql=0A dbh.prepare(sql)=0A t= b =3D dbh.execute(sql)=0A str =3D tb.fetch()=0A get_block =3D str.to_a= =0A =0A while(str!=3Dnil)=0A str =3D tb.fetch()=0A get_block<On Mon, 17 Nov 2003, Stefan Schmiedl wrote:=0A>=0A> > Does anyb= ody have the ingredients at hand to get a working=0A> > connection between = Ruby 1.8 and (MySQL and PostgreSQL) on=0A> > a Windows XP box?=0A>=0A>Insta= ll Linux? :-)=0A>=0A>Actually, I suggest you look at the ruby-dbi package.= =0A>=0A>-- Matt=0A>Boredom isn't the root of _all_ evil, but it tries.=0A>= =0A>=0A --Next_1069059200---0-202.54.124.152-28271--