Joined-Sql Updates/Deletes using updateBatch
From: Jen (anonymous_at_discussions.microsoft.com)
Date: 05/24/04
- Next message: Benjamin: "Controls in a DataGrid"
- Previous message: Daniel: "Forgot something"
- Next in thread: Val Mazur: "Re: Joined-Sql Updates/Deletes using updateBatch"
- Reply: Val Mazur: "Re: Joined-Sql Updates/Deletes using updateBatch"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 24 May 2004 11:56:04 -0700
Hi,
I have 2 tables, One is the trasaction table the other is a lookup table. My sql statement is as follows -
SELECT T.Fld1, T.Fld2, L.Fld2, T.fld3
FROM Transaction T, Lookup L
WHERE T.PK = L.PK
I create the recordset using the above query and persist it as a dom. My app updates some values in the dom and may also delete a record from the Trasaction table. When I try to update my database, using this dom i.e. -
With rst
.CursorLocation = adUseClient
.CursorType = adOpenStatic
.LockType = adLockBatchOptimistic
.open Source:=dom
Set .ActiveConnection = ctn
.UpdateBatch
End With
It also tries to update the lookup table and it fails. If the transaction record is deleted, it tries to delete the record from the lookup table also.
Is there anyway to avoid this. Please Help. Thanks in advance.
- Next message: Benjamin: "Controls in a DataGrid"
- Previous message: Daniel: "Forgot something"
- Next in thread: Val Mazur: "Re: Joined-Sql Updates/Deletes using updateBatch"
- Reply: Val Mazur: "Re: Joined-Sql Updates/Deletes using updateBatch"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|