By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,199 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

Why is this query not updateable

P: n/a
I'm trying to update a Select statement in code. On the rs.Edit line of code
(not shown) I keep getting an error that the object or database is not
updatable.

Why?

Here's the select statement used for the DAO recordset

SELECT A.FIELD1, A.FIELD2, A.FIELD3, A.FIELD4, A.FIELD5, A.FIELD6,
B.FIELD1, B.FIELD2, B.FIELD3, B.FIELD4, B.FIELD5, B.FIELD6
FROM [MAIN_TABLE] AS A, [BACKUP_TABLE] AS B
WHERE A.FIELD1 = B.FIELD1 AND A.FIELD2 = B.FIELD2 AND A.FIELD3 = B.FIELD3;

I'm trying to select the identical records from the two tables so I can then
check if any of the non-key fields are different. But this error has me
stymied.

Thanks.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200612/1

Dec 18 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hi.
I'm trying to update a Select statement in code. On the rs.Edit line of code
(not shown) I keep getting an error that the object or database is not
updatable.

Why?
Your query is using a Cartesian join. Use an ANSI SQL join instead:

SELECT A.Col1, B.Col2
FROM TableA AS A INNER JOIN TableB AS B ON A.DeptID = B.DeptID;

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
"rdemyan via AccessMonster.com" <u6836@uwewrote in message
news:6aebfd239f461@uwe...
I'm trying to update a Select statement in code. On the rs.Edit line of code
(not shown) I keep getting an error that the object or database is not
updatable.

Why?

Here's the select statement used for the DAO recordset

SELECT A.FIELD1, A.FIELD2, A.FIELD3, A.FIELD4, A.FIELD5, A.FIELD6,
B.FIELD1, B.FIELD2, B.FIELD3, B.FIELD4, B.FIELD5, B.FIELD6
FROM [MAIN_TABLE] AS A, [BACKUP_TABLE] AS B
WHERE A.FIELD1 = B.FIELD1 AND A.FIELD2 = B.FIELD2 AND A.FIELD3 = B.FIELD3;

I'm trying to select the identical records from the two tables so I can then
check if any of the non-key fields are different. But this error has me
stymied.

Thanks.

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ccess/200612/1

Dec 18 '06 #2

P: n/a
Thanks. It looks like that did the trick, but I need to do more testing.

'69 Camaro wrote:
>Hi.
>I'm trying to update a Select statement in code. On the rs.Edit line of code
(not shown) I keep getting an error that the object or database is not
updatable.

Why?

Your query is using a Cartesian join. Use an ANSI SQL join instead:

SELECT A.Col1, B.Col2
FROM TableA AS A INNER JOIN TableB AS B ON A.DeptID = B.DeptID;

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
>I'm trying to update a Select statement in code. On the rs.Edit line of code
(not shown) I keep getting an error that the object or database is not
[quoted text clipped - 14 lines]
>>
Thanks.
--
Message posted via http://www.accessmonster.com

Dec 18 '06 #3

P: n/a
You're welcome. Good luck with your queries.

Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
"rdemyan via AccessMonster.com" <u6836@uwewrote in message
news:6aec954565b56@uwe...
Thanks. It looks like that did the trick, but I need to do more testing.

'69 Camaro wrote:
>>Hi.
>>I'm trying to update a Select statement in code. On the rs.Edit line of
code
(not shown) I keep getting an error that the object or database is not
updatable.

Why?

Your query is using a Cartesian join. Use an ANSI SQL join instead:

SELECT A.Col1, B.Col2
FROM TableA AS A INNER JOIN TableB AS B ON A.DeptID = B.DeptID;

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
http://www.Access.QBuilt.com/html/ex...ributors2.html for contact info.
>>I'm trying to update a Select statement in code. On the rs.Edit line of
code
(not shown) I keep getting an error that the object or database is not
[quoted text clipped - 14 lines]
>>>
Thanks.

--
Message posted via http://www.accessmonster.com

Dec 18 '06 #4

P: n/a
"rdemyan via AccessMonster.com" <u6836@uwewrote in
news:6aec954565b56@uwe:
Thanks. It looks like that did the trick, but I need to do more
testing.
We'll all be relieved when you confirm that this is OK!

--
Lyle Fairfield

http://www.ffdba.com/toyota/BurlingtonToyotaLease.htm

(just a sad story - read if bored)
Dec 18 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.