S
Steve B.
Hello,
I'm building an application based on Sql Server CE.
I'm trying to create a SqlCeDataAdapter using the same structure than Visual
Studio generates for a Sql Server 2000 DB.
I want my Data Adapter to use optimistic concurency, and reload the dataset
after an update or an insert.
My Update command is this one :
UPDATE
Customers SET CustomerID = 'f39cc1b9-4bfa-4fba-9c68-7e4b179d31b8', <-- It
is my PK
CustomerCompanyName = 'IBM',
CustomerAdress = '20 route du Rhin 67500 Strasbourg',
FollowedByID = '08f1251d-182d-4c4b-92e7-03a021744d80'
WHERE (CustomerID = 'f39cc1b9-4bfa-4fba-9c68-7e4b179d31b8')
AND (CustomerCompanyName = 'the customer')
AND (FollowedByID = '08f1251d-182d-4c4b-92e7-03a021744d80');
SELECT CustomerID,
CustomerCompanyName,
CustomerAdress,
FollowedByID
FROM
Customers
WHERE (CustomerID = 'f39cc1b9-4bfa-4fba-9c68-7e4b179d31b8')
This command does not work :
1. The SELECT command does not works... I get a parsing error. If I remove
everything after the ';' (included), it can be executed. Does SQL Ce
supports two request in on call ?
2. The data adapter created for desktop application updates the PK. With SQL
Ce I always get an error that tells me the primary key cannot be deleted
because of related records. I do not actually modify the value (ie SET a =
a) but the system seems to do an 'delete' / 'insert' ...
Thanks,
Steve
I'm building an application based on Sql Server CE.
I'm trying to create a SqlCeDataAdapter using the same structure than Visual
Studio generates for a Sql Server 2000 DB.
I want my Data Adapter to use optimistic concurency, and reload the dataset
after an update or an insert.
My Update command is this one :
UPDATE
Customers SET CustomerID = 'f39cc1b9-4bfa-4fba-9c68-7e4b179d31b8', <-- It
is my PK
CustomerCompanyName = 'IBM',
CustomerAdress = '20 route du Rhin 67500 Strasbourg',
FollowedByID = '08f1251d-182d-4c4b-92e7-03a021744d80'
WHERE (CustomerID = 'f39cc1b9-4bfa-4fba-9c68-7e4b179d31b8')
AND (CustomerCompanyName = 'the customer')
AND (FollowedByID = '08f1251d-182d-4c4b-92e7-03a021744d80');
SELECT CustomerID,
CustomerCompanyName,
CustomerAdress,
FollowedByID
FROM
Customers
WHERE (CustomerID = 'f39cc1b9-4bfa-4fba-9c68-7e4b179d31b8')
This command does not work :
1. The SELECT command does not works... I get a parsing error. If I remove
everything after the ';' (included), it can be executed. Does SQL Ce
supports two request in on call ?
2. The data adapter created for desktop application updates the PK. With SQL
Ce I always get an error that tells me the primary key cannot be deleted
because of related records. I do not actually modify the value (ie SET a =
a) but the system seems to do an 'delete' / 'insert' ...
Thanks,
Steve