Hi all, Firstly, thanks for all your help so far, really great. I have installed Perl on my Windows 2000 Server and can run perl scripts from the command line (which is really cool ;-) !!). The trouble I am having now is that I want to run Perl scripts as part of a web site and I cant figure out how to do it. I have created a test website and have created an HTML page that has a hypertext link to a perl script that then reads a database and returns the results to the clients browser. The only thing is - I cant get the perl script to run outside of the command.exe without throwing errors - do I have to do something with IIS to enable my perl scripts to run as they would on a Linux (as CGI) ???
The basic perl code i am using is: use strict; use warnings; use CGI::Carp qw(fatalsToBrowser); use Win32::OLE; ## set up vars my $sql = "SELECT * FROM shippers"; my $Cursor = 3; ## AdOpenStatic Cursor ## set up ADO connection my $conn = new Win32::OLE('adodb.Connection'); $conn->Open(<<EOF); Provider=SQLOLEDB; Persist Security Info=False; User ID=sa; Pwd=password; Initial Catalog=Northwind; EOF ## set up recordset my $rst = new Win32::OLE('ADODB.Recordset'); $rst->Open($sql, $conn, $Cursor); my $field = $rst->Fields->{Count}; my $records = $rst->{RecordCount}; ## set up heading of page print "Content-type: text/html\n\n"; print <<"HTML"; <html> <head> <title>ADODB test page using SQL Server 7</title> </head> <BODY bgcolor="#000000" text="#FFFFCC"> <table align="center" border="0" cellspacing="0" cellpadding="0"> <tr><td colspan="$field"> <font face="arial, helvetica, sans-serif" size="2"> There are $field fields and $records records in the SQL query: $sql"; </font> </table> </body> </html> HTML ## Close it all down and undefine $rst->Close(); $conn->Close; undef($rst); undef($conn); I know this would work if I ran it on an Appache Server - so why not on IIS ??? Also - I am using ADO to connect to my SQL Server database because I couldnt get DBD to work on my server - This means I have full Cursor control enabling me to scroll back and forward through the Recordset - can this be done using DBD ????? And - what is the better of the two ways of connecting to a database ??? Any help would be great Thanks again Anadi _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]