Thanks. This is single user system at this point, so its not that.
The user enters the AssetCode, which is the primary key, so its not that
either.
The update command is large, is there a way for me to write a shorter
version?
I got the command via the partial class you sent. Is AssetSet.Designer.vb
the correct location for me to add the partial class?
Thanks
Vayse
UPDATE `Assets` SET `AssetCode` = ?, `Desc` = ?, `SubCategoryId` = ?,
`PurchaseDate` = ?, `SuppliersCode` = ?, `PurchasePrice` = ?, `CostCentre` =
?, `Department` = ?, `Location1` = ?, `Location2` = ?, `Location3` = ?,
`DeprAmount` = ?, `DeprStart` = ?, `DeprMethod` = ?, `DeprLife` = ?,
`RemainingLife` = ?, `DeprFirstPeriod` = ?, `DeprResidual` = ?, `AccumDepr`
= ?, `HasSchedule` = ?, `StatusID` = ?, `AssetNote` = ?, `AssetImage` = ?,
`DisposalSIN` = ?, `DisposalNom` = ?, `SalesValue` = ?, `SerialNum` = ?,
`Ins_Renewal` = ?, `Ins_CompanyId` = ?, `Ins_PolicyNum` = ?, `Tax_Renewal` =
?, `NCT_Renewal` = ? WHERE ((`AssetCode` = ?) AND ((? = 1 AND `Desc` IS
NULL) OR (`Desc` = ?)) AND ((? = 1 AND `SubCategoryId` IS NULL) OR
(`SubCategoryId` = ?)) AND ((? = 1 AND `PurchaseDate` IS NULL) OR
(`PurchaseDate` = ?)) AND ((? = 1 AND `SuppliersCode` IS NULL) OR
(`SuppliersCode` = ?)) AND ((? = 1 AND `PurchasePrice` IS NULL) OR
(`PurchasePrice` = ?)) AND ((? = 1 AND `CostCentre` IS NULL) OR
(`CostCentre` = ?)) AND ((? = 1 AN
D `Department` IS NULL) OR (`Department` = ?)) AND ((? = 1 AND `Location1`
IS NULL) OR (`Location1` = ?)) AND ((? = 1 AND `Location2` IS NULL) OR
(`Location2` = ?)) AND ((? = 1 AND `Location3` IS NULL) OR (`Location3` =
?)) AND ((? = 1 AND `DeprAmount` IS NULL) OR (`DeprAmount` = ?)) AND ((? = 1
AND `DeprStart` IS NULL) OR (`DeprStart` = ?)) AND ((? = 1 AND `DeprMethod`
IS NULL) OR (`DeprMethod` = ?)) AND ((? = 1 AND `DeprLife` IS NULL) OR
(`DeprLife` = ?)) AND ((? = 1 AND `RemainingLife` IS NULL) OR
(`RemainingLife` = ?)) AND ((? = 1 AND `DeprFirstPeriod` IS NULL) OR
(`DeprFirstPeriod` = ?)) AND ((? = 1 AND `DeprResidual` IS NULL) OR
(`DeprResidual` = ?)) AND ((? = 1 AND `AccumDepr` IS NULL) OR (`AccumDepr` =
?)) AND ((? = 1 AND `HasSchedule` IS NULL) OR (`HasSchedule` = ?)) AND ((? =
1 AND `StatusID` IS NULL) OR (`StatusID` = ?)) AND ((? = 1 AND `AssetNote`
IS NULL) OR (`AssetNote` = ?)) AND ((? = 1 AND `AssetImage` IS NULL) OR
(`AssetImage` = ?)) AND ((? = 1 AND `DisposalSIN` IS NULL) OR (`DisposalSIN`
= ?)
) AND ((? = 1 AND `DisposalNom` IS NULL) OR (`DisposalNom` = ?)) AND ((? = 1
AND `SalesValue` IS NULL) OR (`SalesValue` = ?)) AND ((? = 1 AND `SerialNum`
IS NULL) OR (`SerialNum` = ?)) AND ((? = 1 AND `Ins_Renewal` IS NULL) OR
(`Ins_Renewal` = ?)) AND ((? = 1 AND `Ins_CompanyId` IS NULL) OR
(`Ins_CompanyId` = ?)) AND ((? = 1 AND `Ins_PolicyNum` IS NULL) OR
(`Ins_PolicyNum` = ?)) AND ((? = 1 AND `Tax_Renewal` IS NULL) OR
(`Tax_Renewal` = ?)) AND ((? = 1 AND `NCT_Renewal` IS NULL) OR
(`NCT_Renewal` = ?)))
"Bart Mermuys" <bm*************@hotmail.com> wrote in message
news:u9**************@tk2msftngp13.phx.gbl...
Hi,
"Vayse" <va***@nospam.nospam> wrote in message
news:Ok*****************@tk2msftngp13.phx.gbl...