##Read table staStations
if ($mssqldb->Sql("SELECT stationID, security, dockingCostPerVolume, maxShipVolumeDockable, officeRentalCost, operationID, stationTypeID, corporationID, solarSystemID, constellationID, regionID, stationName, reprocessingEfficiency, reprocessingStationsTake, reprocessingHangarFlag
FROM staStations")) {
print "SQL Error: " . $mssqldb->Error() . "\n";
$mssqldb->disconnect;
exit;
}
# Read table staStations
$count = 0 ;
while ($mssqldb->FetchRow) {
my ($stationID, $security, $dockingCostPerVolume, $maxShipVolumeDockable, $officeRentalCost, $operationID, $stationTypeID, $corporationID, $solarSystemID, $constellationID, $regionID, $stationName, $reprocessingEfficiency, $reprocessingStationsTake, $reprocessingHangarFlag) = $mssqldb->Data(); ### Get data values from the row
$stationName =~ s/\'/\'/g;
$mysqlconnect->do("INSERT INTO staStations(stationID, security, dockingCostPerVolume, maxShipVolumeDockable, officeRentalCost, operationID, stationTypeID, corporationID, solarSystemID, constellationID, regionID, stationName, reprocessingEfficiency, reprocessingStationsTake, reprocessingHangarFlag)
VALUES ('$stationID', '$security', '$dockingCostPerVolume', '$maxShipVolumeDockable', '$officeRentalCost', '$operationID', '$stationTypeID', '$corporationID', '$solarSystemID', '$constellationID', '$regionID', '$stationName', '$reprocessingEfficiency', '$reprocessingStationsTake', '$reprocessingHangarFlag') ;");
$count = $count + 1 ;
print $count . " Rows into staStations \n" ;
}
その最初の部分は正常に動作します
if ($mssqldb->Sql("SELECT iconID, iconFile, description FROM eveIcons")) {
print "SQL Error: " . $mssqldb->Error() . "\n";
$mssqldb->disconnect;
exit;
}
# write table eveIcons
foreach ($mssqldb->FetchRow()) {
my ($iconID, $iconFile, $description) = $mssqldb->Data(); ### Get data values from the row
$description =~ s/\'/\'/g;
#$iconFile =~ s/\_/\_/g;
print "iconID: " . $iconID . "\n" ;
print "file: " . $iconFile . "\n" ;
print "desc: " . $description . "\n \n" ;
$mysqlconnect->do("INSERT INTO eveIcons(`iconID`, `iconFile`, `description`)
VALUES ('$iconID', '$iconFile', '$description') ;");
$count = $count + 1 ;
print $count . " Rows into eveIcons \n" ;
}
問題が見つかりませんが、何も返されません。これはデータを読み取りません..
MySqlテーブルの最初の列に「0」を配置します
MSSQL テーブルには 1689 のレコードがあります。