dbTalk Databases Forums  

Update remote table from local table

comp.database.ms-access comp.database.ms-access


Discuss Update remote table from local table in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
chris ciotti
 
Posts: n/a

Default Update remote table from local table - 01-29-2005 , 09:50 AM






Greetings -

I'm using an Access front end to a SQL Server (2000) database. Via several
steps, I create a temp table and manipulate the data in it. I want to update
the backend with this new data but my UPDATE query fails as my temp table is
local and the SQL database doesn't know about it. There are no linked tables
in the FE database.

I have the following (DAO):

Set Db = CurrentDb Set Qdf = Db.CreateQueryDef(TMP_QUERY_NAME)

Qdf.connect = ConnectString()

sqlString = "UPDATE tblRemote " & _ "SET " & _ "tblRemote.Some_Foo =
tblLocal.Foo, " & _ "FROM tblRemote INNER JOIN tblLocal " & _ "ON
tblRemote.Some_ID = tblLocal.Some_ID;"


Qdf.sql = sqlString Qdf.ReturnsRecords = False Qdf.Execute dbFailOnError

Is there any way of doing this without adding a linked table?

Thanks in advance,

chris


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.