473,785 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1871
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.in fovis.co.uk> wrote in message
news:eW******** *****@TK2MSFTNG P10.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******** ******@TK2MSFTN GP09.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.in fovis.co.uk> wrote in message
news:eW******** *****@TK2MSFTNG P10.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.in fovis.co.uk> wrote in message
news:u4******** ******@tk2msftn gp13.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
6785
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 the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
3
1777
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 possibly be doing wrong on this? Thanks for the help, Stephen
1
1473
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 table. The queries are; UPDATE INNER JOIN srcTbl ON .entry_id = srcTbl.entry_id SET .field1 = ., .field2 = .;
3
2578
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 groupings. The calculation is: unemployment rate = number of unemployed/number of labour force
5
4042
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 think - it might have been XP) to 2003. The database is impressive, both in what it does and the obtuse and inconsistent ways it works. There are several hundred queries, for example, with no indication of where they are used or if they are in fact...
14
2471
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 the biggest security hole, due to the ease of opening, linking, and/or importing raw data directly from the back-end database. I've read information that indicates that locking down the back-end tables to the owner, then using RWOP queries in the...
0
1601
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 run quick queries on the data. (For the firewall admins among you: it's a parser and web-based query tool for CheckPoint firewall rulebases. The user can search for source and destination IPs and get the matching rules.) The current application...
7
2735
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 of the queries work fine when I use them to query the MySQL server directly. My guess is that the MySQL extension only expects a single resource back from the database, but get's several, or that it just checks the statement first, and decides...
2
17945
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 possible. Use Unique Indexes instead of Non-Unique Indexes whenever possible. Include as few Columns as possible in the result set. Refrain from using Expressions, such as IIf(), in Queries. Use Count(*) instead of Count(). Use the...
5
1649
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 some sources have a higher known accuracy than other sources. So, every table has a field named "SupplierCode" & a field named "SupplierName", There are 3 source tables (SourceTable1, SourceTable2, SourceTable3), & a final output table (ResultTable)...
0
9646
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9484
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10157
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10097
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9957
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8983
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7505
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5518
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.