billie_t has asked for the wisdom of the Perl Monks concerning the following question:
The table name "Data" and field names are correct. $machine and $LocUsr variables are defined - they seem fine when I print. The error message I get is "Can't call method SQL on an undefined value at line 46, <machinefile> line 1". Obviously, if that syntax looks ok, I'll recheck connectivity-type stuff. Any wisdom dispensed much appreciated!my($db) = new Win32::ODBC("user_logons"); while (my $machine = <MACHINEFILE>) { my @Results = (); @Results = `psloggedon.exe \\\\$machine`; my $LocUsr = $Results[6]; [...] $db->Sql("INSERT INTO <Data> (pc_name, user_name,time+date) " . +"VALUES ($machine, $LocUsr, GETDATE())"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: win32::odbc/ SQL error
by Coruscate (Sexton) on May 23, 2003 at 01:16 UTC | |
by billie_t (Sexton) on May 23, 2003 at 01:28 UTC | |
by JamesNC (Chaplain) on May 23, 2003 at 01:56 UTC | |
by hangmanto (Monk) on May 23, 2003 at 04:14 UTC | |
|
Re: win32::odbc/ SQL error
by tcf22 (Priest) on May 23, 2003 at 15:12 UTC | |
by billie_t (Sexton) on May 23, 2003 at 21:34 UTC |