Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / October 2007

Tip: Looking for answers? Try searching our database.

Update Query Fails due to Source table not being Updatable

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
WAstarita - 29 Oct 2007 02:09 GMT
I am creating a query to update my SQL server tables from a custom
ODBC driver that accesses my financial software.  Basically I do a SQL
Pass Through query to the ODBC Driver which returns the updated
results.  I have saved this query and it runs successfully every
time.  This query is not updateable.  I then create an Update query
which uses the aformentioned query and joins it to the linked SQL
table by there unique ID.  Its a basic update query from that point.
Now, the target table is updatable, I've proven that to myself 10
different ways, the source again, is not.  I still get "Operation must
use an updateable query." error.
Here is the source

dbo_Account = Linked SQL Server table, updatable
[Account Dirty] = Source table, is a saved SQL Passthrough query, not
updateable

Update dbo_Account LEFT JOIN [Account Dirty] ON dbo_Account.ListID =
[Account Dirty]ListID SET dbo_Account.Balance = [Account
Dirty].Balance, dbo_Account.TotalBalance = [Account
Dirty].TotalBalance

Any way around this?

Thanks in advance
Andy Hull - 29 Oct 2007 12:51 GMT
Hi

Try...

> Update dbo_Account LEFT JOIN [Account Dirty] ON dbo_Account.ListID =
> [Account Dirty]ListID SET dbo_Account.Balance = [Account
> Dirty].Balance, dbo_Account.TotalBalance = [Account
> Dirty].TotalBalance

Update dbo_Account
Set Balance = dlookup("Balance", "[Account Dirty]", "ListID = " & ListID),
TotalBalance = dlookup("TotalBalance", "[Account Dirty]", "ListID = " &
ListID)

I've assumed ListID is numeric. If it is text then the last parameter of the
dlookup function would be...

"ListID = """ & ListID & """"

hth

Andy Hull

> I am creating a query to update my SQL server tables from a custom
> ODBC driver that accesses my financial software.  Basically I do a SQL
[quoted text clipped - 20 lines]
>
> Thanks in advance
WAstarita - 31 Oct 2007 00:56 GMT
Unfortunately, since this is a SQL Passthrough query, DLookup would
not be available since SQL engine would be doing the processing, not
access.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.