Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query on Linked Table

Status
Not open for further replies.

DBAchick

Programmer
Apr 27, 2000
61
I have linked an SQL table through ODBC into my Access 97 database.&nbsp;&nbsp;I created an update query: UPDATE Users LEFT JOIN dbo_SAUSERDATA ON Users.UserID = dbo_SAUSERDATA.UserID SET dbo_SAUSERDATA.UserID = [dbo_sauserdata]![userid]*-1 WHERE (((Users.UserID) Is Null));&nbsp;&nbsp;Basically, if the UserID does not appear in local table USERS, then make the UserID in the linked table dbo_SAUSERDATA a negative number.<br><br>Whenever I execute this query, I get an error 'Must be an updateable query.'&nbsp;&nbsp;I can change the query to a select and get positive results.&nbsp;&nbsp;I can go into the table via Access and change the UserIDs to negatives.&nbsp;&nbsp;I cannot however, delete or update the table using this query.&nbsp;&nbsp;(It gives me the same error if I change it to a DELETE query).<br><br>I have checked the permissions on the SQL table and gave permissions to all groups and users for SELECT, UPDATE, DELETE, DRI, EXECUTE, INSERT, the works.<br><br>What am I doing wrong??<br><br>
 
Don't quote me on this, but I am pretty sure you cannot use an update query with a linked ODBC Database. In our Access/SQL Server application, we had to to all of our updating through ADO. Since we didn't link our tables, I can't be sure, but I believe this is one of the reasons why we went completely unbound for everything. Not to mention the performance difference is like night and day.<br><br> <p>Jim Lunde<br><a href=mailto:compugeeks@hotmail.com>compugeeks@hotmail.com</a><br><a href= Application Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top