P
Philippe Bertrand
1. DbCommandBuilder should detect when a column appears twice in the select
list and issue an error.
For example:
SELECT id, c_bit, c_bit FROM adocmdbld
gives
"UPDATE adocmdbld SET c_bit = ?, c_bit = ? WHERE ((id = ?) AND ((? = 1
AND c_bit IS NULL) OR (c_bit = ?)) AND ((? = 1 AND c_bit IS NULL) OR (c_bit
= ?)))"
"INSERT INTO adocmdbld (c_bit, c_bit) VALUES (?, ?)"
"DELETE FROM adocmdbld WHERE ((id = ?) AND ((? = 1 AND c_bit IS NULL) OR
(c_bit = ?)) AND ((? = 1 AND c_bit IS NULL) OR (c_bit = ?)))"
2. DbCommandBuilder should detect when select has only read-only primary key
columns
For example:
SELECT id FROM adocmdbld
(where id is an autoincrement column)
gives:
UPDATE adocmdbld WHERE ((id = ?))
INSERT INTO adocmdbld DEFAULT VALUES
DELETE FROM adocmdbld WHERE ((id = ?))
Thanks,
Philippe
list and issue an error.
For example:
SELECT id, c_bit, c_bit FROM adocmdbld
gives
"UPDATE adocmdbld SET c_bit = ?, c_bit = ? WHERE ((id = ?) AND ((? = 1
AND c_bit IS NULL) OR (c_bit = ?)) AND ((? = 1 AND c_bit IS NULL) OR (c_bit
= ?)))"
"INSERT INTO adocmdbld (c_bit, c_bit) VALUES (?, ?)"
"DELETE FROM adocmdbld WHERE ((id = ?) AND ((? = 1 AND c_bit IS NULL) OR
(c_bit = ?)) AND ((? = 1 AND c_bit IS NULL) OR (c_bit = ?)))"
2. DbCommandBuilder should detect when select has only read-only primary key
columns
For example:
SELECT id FROM adocmdbld
(where id is an autoincrement column)
gives:
UPDATE adocmdbld WHERE ((id = ?))
INSERT INTO adocmdbld DEFAULT VALUES
DELETE FROM adocmdbld WHERE ((id = ?))
Thanks,
Philippe