Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
this line $EDS_DB->Sql("INSERT INTO Servers (Server_Name) VALUES ('$srv_name')"); doesn't seem to work i.e. it only adds one entry in randon to the table "Servers" however if I comment it out then I do get a data dump of all info in the Master table!use Win32::ODBC; my $DSN = 'Monday'; my $srv_tbl = 'Servers'; my $Master = 'Master'; my $Applications = 'Applications'; my $EDS_DB = new Win32::ODBC($DSN) or die "Error => $!\n"; die "Sql Failed" . $EDS_DB->Error( ) . "\n" if ($EDS_DB->Sql("SELECT * + FROM Master")); my $srv_name; my $app; while ($EDS_DB->FetchRow()) { my %data = $EDS_DB->DataHash(); $srv_name = $data{"Server_Name"}; $app = $data{"Application"}; print qq(Server Name is $srv_name, $app\n); $EDS_DB->Sql("INSERT INTO Servers (Server_Name) VALUES ('$srv_ +name')"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Inserting values into MS Access
by davidrw (Prior) on Jun 06, 2005 at 16:00 UTC | |
by Anonymous Monk on Jun 06, 2005 at 16:23 UTC | |
by davidrw (Prior) on Jun 06, 2005 at 16:43 UTC | |
by blackadder (Hermit) on Jun 06, 2005 at 21:16 UTC | |
|
Re: Inserting values into MS Access
by VSarkiss (Monsignor) on Jun 06, 2005 at 17:02 UTC | |
by blackadder (Hermit) on Jun 06, 2005 at 18:04 UTC |