concept03 has asked for the wisdom of the Perl Monks concerning the following question:
Also, here is the error message I receive on the webpage before I refresh:use Win32::OLE qw (in); use CGI qw(:standard); print header; print start_html('Active Directory query results'); my $theLookupID = param('theLookupID'); my $strName = $theLookupID; my $strBase = "<LDAP://ou=my,dc=foo,dc=bar,dc=com>;"; # BaseDN shou +ld be the search base my $strFilter = "(&(objectCategory=user)(samaccountname=$strName));"; + # Valid LDAP search filter my $strAttrs = "AdsPath,cn;"; # Comma-seperated list my $strScope = "Subtree"; # Should be on of Subtree, One +level or Base my $oUser; $Win32::OLE::Warn = 3; my $objConn = Win32::OLE->CreateObject("ADODB.Connection"); $objConn->{Provider} = "ADsDSOObject"; $objConn->Open; my $objRS = $objConn->Execute($strBase . $strFilter . $strAttrs . $str +Scope); $objRS->MoveFirst; while (not $objRS->EOF) { print $objRS->Fields(1)->Value," - "; $strLdap = $objRS->Fields(0)->Value; $oUser = Win32::OLE->GetObject("$strLdap"); print "$oUser->{samaccountname}<br>"; $objRS->MoveNext; } print end_html;
Any ideas?Table does not exist. Win32::OLE(0.1701) error 0x80040e37 in METHOD/PR +OPERTYGET "Execute" at D:\www\infra\cgi-bin\lookup.pl line 35 Content +-Type: text/html; charset=ISO-8859-1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: cgi script fails until refreshed in IE - then it works
by Grygonos (Chaplain) on Aug 06, 2004 at 15:24 UTC | |
|
Re: cgi script fails until refreshed in IE - then it works
by Prior Nacre V (Hermit) on Aug 06, 2004 at 15:40 UTC | |
by concept03 (Initiate) on Aug 09, 2004 at 13:08 UTC |