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

  • Thread starter Thread starter mike11d11
  • Start date Start date
M

mike11d11

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!
 
you could write a join and use an ADO recordset

ADO is faster then all this ADO.net _CRAP_

-Aaron
 
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?
 
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.
 
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
 
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.
 
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!
 
Back
Top