Hi All
I am in the process of converting our existing system from NT to Windows
2000.  I am having problems getting the code to run from within a browser.
The code will run from the cmd line with no problems but when I try to call
it as a web page it gives me CGI errors.
Here is the code that works for NT.

I am running activeperl 5.6.1 build 633 on the NT server and activeperl
5.6.1 build 633 on the Win 2000 server.

use CGI qw/:all/;
use MIME::Base64;

$web = new CGI;
$FirstScreenIn = 1;
  require 'c:/inetpub/cgi/Lib/ConInfo.pl';
  &ConInfo;
  use Win32::OLE;
  use Win32::ADO;
  my @DBerrors = ();
  $rsUserRoles = Win32::OLE->new("ADODB.Recordset");

   $UsernameInRole = "MCC";

   $UsernameIn = "MCC.XX";


  $sql = 'select * from UserRoles ';
  $sql= $sql." where (UserKey = '$UsernameInRole') ";
  $rsUserRoles->Open($sql, $con, Win32::ADO::adOpenDynamic,
Win32::ADO::adLockOptimistic, Win32::ADO::adCmdText);
  Win32::ADO::CheckDBErrors($con, [EMAIL PROTECTED]) or die " Request sql failed at
\n", @DBerrors;   

    $SubroutinePath = $rsUserRoles->fields("Location")->value;
###This is where it blows saying that value dosn't exist. and gives the CGI
errors.
    $SubroutineName = $rsUserRoles->fields("ProgramName")->value;
        $rsUserRoles->Close;

     print $web->header();
     require $SubroutinePath;
     eval($SubroutineName);



Thanks
Larry


sub ConInfo {
  use Win32::OLE;
  use Win32::OLE::Variant;
  use Win32::ADO;
  $con = Win32::OLE->new("ADODB.Connection");
#; Everything after this line is an OLE DB initstring
$con->Open("Provider=MSDAORA.1;Password=somepassword;User ID=someidname;Data
Source=xxxx;Persist Security Info=True");

  $cmd = Win32::OLE->new("ADODB.Command");
}
1;

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to