From: Raju Alluri Date: 2008-12-28T10:39:54+09:00 Subject: database access problem through cgi script Hi, I am trying to print a set of data from database with a CGI script. This script works fine a simple ruby script. But doesnt work in cgi script. Any help is appreciated. connection = WIN32OLE.new('ADODB.Connection') connection.Open('Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\INFOPROJECT\db1.mdb') recordset = WIN32OLE.new('ADODB.Recordset') sql = "select * from GuestBook" recordset.Open(sql, connection) data = recordset.GetRows #.transpose puts data recordset.Close connection.close How can i call the above statements in below cgi script to make it work. #!/usr/bin/ruby require 'win32ole' require 'cgi' cgi = CGI.new("html3") cgi.out() do cgi.html() do cgi.head{ cgi.title{"DATABASE"} } + cgi.body() do cgi.form() do cgi.textarea("get_text") + cgi.br + end end end -- Posted via http://www.ruby-forum.com/.