NestedDataSets who will Update and how will it locate?
From: Coder (alldukes_at_hotmail.com)
Date: 01/23/05
- Previous message: Dave Blake: "Re: Cursor behaviour with cached updates"
- Next in thread: Brian Bushay TeamB: "Re: NestedDataSets who will Update and how will it locate?"
- Reply: Brian Bushay TeamB: "Re: NestedDataSets who will Update and how will it locate?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 23 Jan 2005 12:39:23 +0200
I am using D7 + MsSql2000 + BetterAdo + MsDataShape on the sample database
"NorthWind"
CONNECTION AS:
Provider=MSDataShape.1;Persist Security Info=False;Data
Source=PC-CODEX;Integrated curity=SSPI;Initial Catalog=Northwind;Data
Provider=SQLOLEDB;
ORDERSDATASET AS:
SHAPE {
SELECT
Orders.*,
Customers.CompanyName,
Customers.ContactName,
Employees.FirstName,
Employees.LastName
FROM Orders
LEFT JOIN Customers ON Customers.CustomerId = Orders.CustomerId
LEFT JOIN Employees ON Employees.EmployeeId = Orders.EmployeeId
WHERE
Orders.OrderId = ?
}
APPEND (
{
SELECT
[Order Details].*,
Products.ProductName
FROM [Order Details]
LEFT JOIN Products ON [Order Details].ProductId = Products.ProductId
Where OrderId=?
}
RELATE OrderID TO Parameter 0
)
LockType is ltBatchOptimistic
DETAILSDATASET AS:
DatasetField set to ORDERSDATASET.Chapter1
After Editing DATASETS
ORDERSDATASET.UpdateBatch() updates ORDERS only but not the DETAILS
Are'nt the DETAILS a part of MASTER and shouldbe resolved by ADO
or should I always use
Transaction.begin
UpdateMaster
UpdateDetail
TransactionCommit
And why not the LinkedFields are not updated when I do Inserts in details,
instead I do assign them manualy?
Besides when I watch the UpdateSQL I see the WHERE clause to be PK =xxx and
UpdatedFields=OldValues but what if I want PK=xxx only! Or maybe a difrent
criteria, like setting providersflags? Nothing in BorlandsADO and I can't
manage those in BetterADO...
WHERE ARE THE RESOURCES ON THESE TOPICS, WHY NOTHING IS DOCUMENTED
COMPLETELY AND CLEARLY WITH SAMPLES FOR REAL LIFE APPLICATIONS...
I thought it will be simpler but it took more time experiencing these stuff,
I wonder if was quite happy using a MemTable, and doing all the Fetching to
Dataset, Loading to MemTable, Editing , Loading back to Dataset, Checking
For Conflicts on server, Updating to server by my own SQLs, it was hard work
but I was sure what I was doing....
- Previous message: Dave Blake: "Re: Cursor behaviour with cached updates"
- Next in thread: Brian Bushay TeamB: "Re: NestedDataSets who will Update and how will it locate?"
- Reply: Brian Bushay TeamB: "Re: NestedDataSets who will Update and how will it locate?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|