473,399 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Queries on tables from different data sources

Hi

I need to perform two queries in sequence on two identical access tables.
The source table is coming from a dataset returned by a web method and the
destination table is from a local access table. The queries are;

UPDATE [destTbl] INNER JOIN srcTbl ON [destTbl].entry_id = srcTbl.entry_id
SET [destTbl].field1 = [srcTbl].[field1], [destTbl].field2 =
[srcTbl].[field2];

and

INSERT INTO [destTbl] (field1, field2)
SELECT srcTbl.field1, srcTbl.field2
FROM srcTbl
WHERE (((srcTbl.entry_id) Not In (SELECT srcTbl.entry_id FROM [destTbl])));

I have two problems. a) What code do I need to tell the query that srcTble
is from the web method. b) There seem to be two connections; a web
connection and a local connection. What connection should I use to execute
the query?

If I have totally misunderstood how to carry this out then please let me
know.

Thanks

Regards


Nov 21 '05 #1
3 1859
I think you asked the same question on the other newsgroup.

In short,
you cannot "perform a database query" across the web service.
"Performing the query" implies you are directly connected to the database.
If you got the dataset from a webservice, then you probably cannot update
the database table directly, because the db is probably accessible only from
the webservice that delivered the dataset to you.

So, if you want to update the db, then you'll need to send the modified
dataset back to the webservice, and have the webservice "perform the query"
(the update).

On the second query (the insert), I answered that separately. Obviously
here you are using a local db connection to your MS Access database.

-Dino
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:eW*************@TK2MSFTNGP10.phx.gbl...
Hi

I need to perform two queries in sequence on two identical access tables.
The source table is coming from a dataset returned by a web method and the
destination table is from a local access table. The queries are;

UPDATE [destTbl] INNER JOIN srcTbl ON [destTbl].entry_id = srcTbl.entry_id
SET [destTbl].field1 = [srcTbl].[field1], [destTbl].field2 =
[srcTbl].[field2];

and

INSERT INTO [destTbl] (field1, field2)
SELECT srcTbl.field1, srcTbl.field2
FROM srcTbl
WHERE (((srcTbl.entry_id) Not In (SELECT srcTbl.entry_id FROM [destTbl])));
I have two problems. a) What code do I need to tell the query that srcTble
is from the web method. b) There seem to be two connections; a web
connection and a local connection. What connection should I use to execute
the query?

If I have totally misunderstood how to carry this out then please let me
know.

Thanks

Regards

Nov 21 '05 #2
Hi Dino

Thanks for this. I am not sure if I was clear enough. I am trying to update
the local db from the web service dataset. So update and insert is not a
problem. What puzzles me is this; what connection string I can use with the
da to perform a select on the web dataset to access the remote data which I
can then insert or update into the local db.

Thanks

Regards
"Dino Chiesa [Microsoft]" <di****@online.microsoft.com> wrote in message
news:OV**************@TK2MSFTNGP09.phx.gbl...
I think you asked the same question on the other newsgroup.

In short,
you cannot "perform a database query" across the web service.
"Performing the query" implies you are directly connected to the database.
If you got the dataset from a webservice, then you probably cannot update
the database table directly, because the db is probably accessible only from the webservice that delivered the dataset to you.

So, if you want to update the db, then you'll need to send the modified
dataset back to the webservice, and have the webservice "perform the query" (the update).

On the second query (the insert), I answered that separately. Obviously
here you are using a local db connection to your MS Access database.

-Dino
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:eW*************@TK2MSFTNGP10.phx.gbl...
Hi

I need to perform two queries in sequence on two identical access tables. The source table is coming from a dataset returned by a web method and the destination table is from a local access table. The queries are;

UPDATE [destTbl] INNER JOIN srcTbl ON [destTbl].entry_id = srcTbl.entry_id SET [destTbl].field1 = [srcTbl].[field1], [destTbl].field2 =
[srcTbl].[field2];

and

INSERT INTO [destTbl] (field1, field2)
SELECT srcTbl.field1, srcTbl.field2
FROM srcTbl
WHERE (((srcTbl.entry_id) Not In (SELECT srcTbl.entry_id FROM

[destTbl])));

I have two problems. a) What code do I need to tell the query that srcTble is from the web method. b) There seem to be two connections; a web
connection and a local connection. What connection should I use to execute the query?

If I have totally misunderstood how to carry this out then please let me
know.

Thanks

Regards


Nov 21 '05 #3

"John" <jo**@nospam.infovis.co.uk> wrote in message
news:u4**************@tk2msftngp13.phx.gbl...
What puzzles me is this; what connection string I can use with the
da to perform a select on the web dataset to access the remote data which I can then insert or update into the local db.

The dataset you received from the webservice - there is no connection
string. The DataSet is a disconnected data cache. It has already been
populated by the time you receive it from the webservice. The data is not
remote at this point. the Dataset contains a local copy of the data that is
owned and managed by a remote database - the database that the webservice
queried for you.

You do not "select" from the dataset to access the data. You can just copy
the data, by calling da.Update(). But you will have to mark each datarow
as being updated, or the Update() will not apply.

This is what is illustrated in the following example:
http://www.winisp.net/cheeso/srcview...le=copydata.cs
-D
Thanks

Regards

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
3
by: Stephen | last post by:
It is possible to relate queries to tables, right? It seems logical but when I try to match my queries to any of the tables or even to each other it gives me a blank relationship. What could I...
1
by: John | last post by:
Hi I need to perform two queries in sequence on two identical access tables. The source table is coming from a dataset returned by a web method and the destination table is from a local access...
3
by: brian kaufmann | last post by:
Hi, I had sent this earlier, and would appreciate any suggestions on this. I need to make calculations for unemployment rate for three different data sources (A,B,C) for many countries and age...
5
by: Jerry Hull | last post by:
I'm working with a database developed by an untrained person over several years - and on a network that has recently been upgraded with a new server installed and MS office upgraded from 2K (I...
14
by: google | last post by:
I am creating a new database for use within our company, that I'd like to make reasonably secure (short of a true server based solution). The back-end of a non-server based database seems to be...
0
by: Christoph Haas | last post by:
Hi, list... I have written an application in Perl some time ago (I was young and needed the money) that parses multiple large text files containing nested data structures and allows the user to...
7
by: Daz | last post by:
Hi. I am trying to select data from two separate MySQL tables, where I cannot use join, but when I put the two select queries into a single query, I get an error telling me to check my syntax. Both...
2
ADezii
by: ADezii | last post by:
Create Indexes on all Columns used in 'ad hoc' Query Joins, restrictions, and sorts (Jet already creates Indexes for Enforced Relationships). Use Primary Keys instead of Unique Indexes wherever...
5
by: DaveLock | last post by:
Hi, I have 3 tables of data created from different sources, each with the same 2 fields & I wanted to fill the 2nd field of another table with the data on condition. The condition is because...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.