From: Brian Candler Date: 2008-09-22T21:03:29+09:00 Subject: Re: Database Query Erik Johansen wrote: > Im trying to fetch a value from a field in our database, using this > code. > > selected = @site.db.select("select car from car_sale where id=402 AND > email='a1@a.com'") > > But this throws the errormessage. > RemoteDatabase::Error: invalid environment > > Does anybody knows how to get a value properly from the db? You'll need to provide more info first. (1) What database access library and version are you using? How did you install it? Did you build any parts of it yourself? If so, what commands did you use? (2) What database and version are you talking to? Can you demonstrate the same select query using a CLI client for that database? (3) What code did you use to create @site.db? (4) What version of Ruby are you running? (5) What operating system are you running Ruby under? ("ruby -v" gives a short answer to (4) and (5)) -- Posted via http://www.ruby-forum.com/.