473,387 Members | 1,529 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,387 software developers and data experts.

Merging two tables in Dataset? I only want to get the matching info based on the two key fields

I have a dataset with a account table and another table that contains
transactions for accounts in the account table. I create a crystal
report based off an inner join query of the two tables but takes way
too long to generate. I was told if I can get them into one table that
would fix my speed issue. I'm thinking if there is some way to maybe
create a merged table of the two together and only getting data from
both tables where the Account# field matchup? Any help or ideas would
be great!

Dec 1 '06 #1
8 2042
you could write a join and use an ADO recordset

ADO is faster then all this ADO.net _CRAP_

-Aaron


mike11d11 wrote:
I have a dataset with a account table and another table that contains
transactions for accounts in the account table. I create a crystal
report based off an inner join query of the two tables but takes way
too long to generate. I was told if I can get them into one table that
would fix my speed issue. I'm thinking if there is some way to maybe
create a merged table of the two together and only getting data from
both tables where the Account# field matchup? Any help or ideas would
be great!
Dec 1 '06 #2
Mike,

Using a relation or just using a join direct from your database is in my
opinion the best answer.

However a direct answer to your question you find in this sample.

http://www.vb-tips.com/dbPages.aspx?...3-8a9529b2b38b
I hope this helps,
Cor
"mike11d11" <mi*******@yahoo.comschreef in bericht
news:11**********************@j44g2000cwa.googlegr oups.com...
>I have a dataset with a account table and another table that contains
transactions for accounts in the account table. I create a crystal
report based off an inner join query of the two tables but takes way
too long to generate. I was told if I can get them into one table that
would fix my speed issue. I'm thinking if there is some way to maybe
create a merged table of the two together and only getting data from
both tables where the Account# field matchup? Any help or ideas would
be great!

Dec 2 '06 #3
Why don't you make a view (or a stored procedure) in a database that
joins the tables in question and then use that as the data source for
the report?

On 1 Dec 2006 15:55:21 -0800, "mike11d11" <mi*******@yahoo.comwrote:
>I have a dataset with a account table and another table that contains
transactions for accounts in the account table. I create a crystal
report based off an inner join query of the two tables but takes way
too long to generate. I was told if I can get them into one table that
would fix my speed issue. I'm thinking if there is some way to maybe
create a merged table of the two together and only getting data from
both tables where the Account# field matchup? Any help or ideas would
be great!
--

Bits.Bytes.
http://bytes.thinkersroom.com
Dec 2 '06 #4
I thought of that, but I have a filtering process that removes accounts
from the table as people work the records on my form. They might start
with 5K
account records and then filter it down to 2K records by removing rows
that dont meet the criteria that they need to work specific records.
If I do the
join off the amount of records on the server then my report would
reflect the 5K records and there transactions and not the 2K that I
want to see at that time.

Dec 2 '06 #5
sounds efficient lol

You could just issue a delete statement in the database when they don't
want to see that data anymore

ROFL what a dipshit

did it ever occur to you to either have a many to many list.. like a
'shopping cart' or shit a single bit column 'isOnList'

or is that too complex for you

I reccomend that you go back to MS Access; they're going to kill off
VB.net in the next release anyways.

C# won the war; and I personally would rather suck 20 diseased cocks
then ever use a langauge named C

-Aaron

mike11d11 wrote:
I thought of that, but I have a filtering process that removes accounts
from the table as people work the records on my form. They might start
with 5K
account records and then filter it down to 2K records by removing rows
that dont meet the criteria that they need to work specific records.
If I do the
join off the amount of records on the server then my report would
reflect the 5K records and there transactions and not the 2K that I
want to see at that time.
Dec 2 '06 #6
How do you know to filter the records out? Do you have a flag in the
table in the recordset?

If dataset.merge doesn't work (and I don't think it does, because
from what I've read of it, it updates your recordset first, and
can't see the filtering you've put in place), you could always
create another datatable either inside your dataset or just a
detached one, and write a manual match/merge of the two tables,
putting the matches into the third table. You could try that and
see what kind of performance you get.

Robin S.
---------------------------------
"mike11d11" <mi*******@yahoo.comwrote in message
news:11**********************@79g2000cws.googlegro ups.com...
>I thought of that, but I have a filtering process that removes accounts
from the table as people work the records on my form. They might start
with 5K
account records and then filter it down to 2K records by removing rows
that dont meet the criteria that they need to work specific records.
If I do the
join off the amount of records on the server then my report would
reflect the 5K records and there transactions and not the 2K that I
want to see at that time.

Dec 3 '06 #7
I think I figured a fast way, I took my trans table and created another
fill query. then within my code I would flip ClearOnFill to False and
Then begin filling the trans table with each account number from my
account list and it fills my trans table with accounts the same as a
join would. It runs quickly and I guess this will be my solution for
now. I filter by containing two list boxes on my form. one populates
with all my column names and the other populates with all the unique
values from the particular column that is chosen. Right now I'm just
removing rows from the dataset that dont match the selected criteria
using the Select method. Its not the fastest solution but it is the
best that i've come up with to report off the specific records in the
table. thanks for all the help!

Dec 8 '06 #8
Cool! I'm glad you found up with a solution!

Robin S.
-------------------
"mike11d11" <mi*******@yahoo.comwrote in message
news:11*********************@73g2000cwn.googlegrou ps.com...
>I think I figured a fast way, I took my trans table and created another
fill query. then within my code I would flip ClearOnFill to False and
Then begin filling the trans table with each account number from my
account list and it fills my trans table with accounts the same as a
join would. It runs quickly and I guess this will be my solution for
now. I filter by containing two list boxes on my form. one populates
with all my column names and the other populates with all the unique
values from the particular column that is chosen. Right now I'm just
removing rows from the dataset that dont match the selected criteria
using the Select method. Its not the fastest solution but it is the
best that i've come up with to report off the specific records in the
table. thanks for all the help!

Dec 9 '06 #9

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

Similar topics

0
by: Walt Borders | last post by:
Hi, My problem: Merging two datasets deletes parent elements, preserves all children. I've created two dataSets. Each use the same schema, parent-child nested tables. The first dataSet is...
3
by: Patrick | last post by:
I have got 2 XML documents, both of which conform to the same XSD Schema, which define possible optional elements. The 2 XML documents contain 2 disjoint set of XML elements. What is the best,...
2
by: Gary Lynch | last post by:
I am looking for a simple solution to a recurrent problem with imported data in Access 97. The example below is a simplification of a problem with a much larger database. Let's say I start out...
1
by: svdh | last post by:
I have posed a question last saturday and have advanced alot in the meantime. But I am still not there Problem is that I try to merging various fields from various tables in one document in Word...
11
by: dskillingstad | last post by:
I've been struggling with this problem for some time and have tried multiple solutions with no luck. Let me start with, I'm a novice at Access and I'm not looking for someones help to design my...
2
by: Dan Cooper | last post by:
I've got two datasets, each containing a single data table. dstDataSetA.Tables("TableA") dstDataSetB.Tables("TableB") I want to merge them together and delete any non-matching rows. ...
10
by: Jim Devenish | last post by:
I have a split front end/back end system. However I create a number of local tables to carry out certain operations. There is a tendency for the front end to bloat so I have set 'compact on...
2
by: adwest | last post by:
Forgive me if this is a foolish question. I "play" in Access and have only created a few rather simple relational databases. My knowledge and experience is limited. I have no formal training, just...
2
by: Neil Chambers | last post by:
I am trying to get my head around dataset merging but despite a little research I could still use a pointer (or ten). Basically I want to perform an outer join operation on a dataset (created from...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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...

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.