This is what I do for my MS SQL server.
$FullName =~ s/'/''/g;
$Description =~ s/'/''/g;
Double up the Apostrophe's. SQL loves it.
my $SQL = "sp_Int_ObjectAdd \'$ADsPath\', \'$ObjType\', $Account";
if (&ExecuteSQL ($db, $SQL)) {
if ($db->FetchRow()) {
my %Data = $db->DataHash('ObjectID');
my $SQL = "sp_Int_UserAdd $Data{'ObjectID'},
$FullName, $Description,
$HomeDirDrive, $HomeDirectory, $Profile,
$LogonScript,
$PasswordAge, $PasswordExpired, $LockedOut,
$PasswordCanNotExpire, $UserCanNotChangePassword,
$AccountDisabled";
&ExecuteSQL ($db, $SQL);
} else {
print "Nothing to fetch\n";
}
}
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs