V
Vayse
I want to set up a form where a user can enter the Purchase Price for some
Assets. No other data will be entered, just the PurchacePrice. But I also
wish to display several other fields, like the AssetCode, So I load the form
as follows:
Dim stSQL As String = "SELECT AssetCode, AssetDesc, PurchasePrice FROM
Assets"
Dim connAsset As New OleDbConnection(conCONNECT)
Dim adapAssetReg As New OleDbDataAdapter(stSQL, connAsset)
Dim dtAsset As New DataTable
adapAssetReg.Fill(dtAsset)
Now when the user is finished I only wish to update the PurchasePrice.
Now if I use the standard command builder, I get a update command that
updates all fields.
Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(adapAssetReg)
adapAssetReg.Update(dtAsset)
(Ideally, I will first create a datatable which just has the updated rows)
Is it possible to write an updatecommand that only updates the
PurchasePrice? It seems a bit of overkill to update all fields.
Thanks
Vayse
Assets. No other data will be entered, just the PurchacePrice. But I also
wish to display several other fields, like the AssetCode, So I load the form
as follows:
Dim stSQL As String = "SELECT AssetCode, AssetDesc, PurchasePrice FROM
Assets"
Dim connAsset As New OleDbConnection(conCONNECT)
Dim adapAssetReg As New OleDbDataAdapter(stSQL, connAsset)
Dim dtAsset As New DataTable
adapAssetReg.Fill(dtAsset)
Now when the user is finished I only wish to update the PurchasePrice.
Now if I use the standard command builder, I get a update command that
updates all fields.
Dim builder As OleDbCommandBuilder = New OleDbCommandBuilder(adapAssetReg)
adapAssetReg.Update(dtAsset)
(Ideally, I will first create a datatable which just has the updated rows)
Is it possible to write an updatecommand that only updates the
PurchasePrice? It seems a bit of overkill to update all fields.
Thanks
Vayse