we explain how to import data from Excell file and here also we wrote this code based on the import from excell file and this code change the item description for each item in the system :
ttsbegin; do
{
try
{
row++;
itemId = COMVariant2Str(cells.item(row, 3).value());
_itemName = COMVariant2Str(cells.item(row, 4).value());
if(row > 1 )
{
while select forupdate _InventTable where _InventTable.ItemId==itemId
{
_InventTable.ItemName=_itemName;
_InventTable.update();
counter++;
}
}
}
catch
{
Error(strfmt("Upload Failed in row %1", row));
}
type = cells.item(row+1, 1).value().variantType();
}while (type != COMVariantType::VT_EMPTY);
ttscommit;
ttsbegin; do
{
try
{
row++;
itemId = COMVariant2Str(cells.item(row, 3).value());
_itemName = COMVariant2Str(cells.item(row, 4).value());
if(row > 1 )
{
while select forupdate _InventTable where _InventTable.ItemId==itemId
{
_InventTable.ItemName=_itemName;
_InventTable.update();
counter++;
}
}
}
catch
{
Error(strfmt("Upload Failed in row %1", row));
}
type = cells.item(row+1, 1).value().variantType();
}while (type != COMVariantType::VT_EMPTY);
ttscommit;

Like
Report
*This post is locked for comments