dataset merge bug!

E

Esref DURNA

my query returns 12000 rows

I m filling the dataset with increment size 5000
this.MainTableDA.Fill(ds,start,5000,MainViewName);

but when I merge two dataset with have 5000 rows it couse an error sometimes
it returns

shortly 5000 rows 5000 rows not equal to 10,000 rows. sometimes it have 7022
rows sometimes 65023 rows.

its not fixed.

the merge method is not working well

i think it is bacause merge method does not work well.

anyone have any idea?



Esref DURNA
 
P

Patrice

The stange thing is that you don't always have the same results. Are you
sure you always starts from the same initial condition ? (do you have
deleted rows after a while for example in one or the other dataset ?)

I have no idea what you have tried for now but I would likely still
investigate this a bit. In particular you could see if you can repro this in
a consistant manner with the smallest possible code...
 
C

Cowboy \(Gregory A. Beamer\)

I would need some code to repro what is happening. The fact you are getting
different results is disconcerting.

--
Gregory A. Beamer

*************************************************
Think Outside the Box!
*************************************************
 
J

Jeff Dillon

If the datasets have identical primary keys, it won't "add" but "update"

Jeff
 
E

Esref DURNA

int start = 0;

try

{



int increment =1000;


MainTable.Clear();

DataSet ds=new DataSet();


ds=myDataSet.Clone();

do

{

ds.Tables[MainViewName].Clear();

this.MainTableDA.Fill(ds,start,increment,MainViewName);


int temp1=myDataSet.Tables[MainViewName].Rows.Count;

int temp2=ds.Tables[MainViewName].Rows.Count;



myDataSet.Merge(ds);


int temp3=myDataSet.Tables[MainViewName].Rows.Count;

int temp4=ds.Tables[MainViewName].Rows.Count;

start += increment;

}while (start == myDataSet.Tables[MainViewName].Rows.Count);



temp1 = 1000

temp2 = 1000

temp3 = 1978

temp4 = 1000



and yes we have identity column as primary key. this think is that if the
dataset becomes large it gives this error.

we are opening 20 40 tables without an error but only the big one gives this
bug!









----- Original Message -----
From: "Patrice" <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.adonet
Sent: Wednesday, May 03, 2006 2:47 PM
Subject: Re: dataset merge bug!
 
P

Patrice

I was more thinking about a compilable demo with data created by code so
that we can understand which keys are involved., see what you do when an
exception is raised etc...

Also have you tried to see if you have the same behavior if you fill the
whole table rather than looping...
--

Patrice

Esref DURNA said:
int start = 0;

try

{



int increment =1000;


MainTable.Clear();

DataSet ds=new DataSet();


ds=myDataSet.Clone();

do

{

ds.Tables[MainViewName].Clear();

this.MainTableDA.Fill(ds,start,increment,MainViewName);


int temp1=myDataSet.Tables[MainViewName].Rows.Count;

int temp2=ds.Tables[MainViewName].Rows.Count;



myDataSet.Merge(ds);


int temp3=myDataSet.Tables[MainViewName].Rows.Count;

int temp4=ds.Tables[MainViewName].Rows.Count;

start += increment;

}while (start == myDataSet.Tables[MainViewName].Rows.Count);



temp1 = 1000

temp2 = 1000

temp3 = 1978

temp4 = 1000



and yes we have identity column as primary key. this think is that if the
dataset becomes large it gives this error.

we are opening 20 40 tables without an error but only the big one gives
this bug!









----- Original Message -----
From: "Patrice" <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.adonet
Sent: Wednesday, May 03, 2006 2:47 PM
Subject: Re: dataset merge bug!

The stange thing is that you don't always have the same results. Are you
sure you always starts from the same initial condition ? (do you have
deleted rows after a while for example in one or the other dataset ?)

I have no idea what you have tried for now but I would likely still
investigate this a bit. In particular you could see if you can repro this
in a consistant manner with the smallest possible code...
 
E

Esref DURNA

this is a client application and the database is at the remote. (not at the
intranet at the internet)
so the datastransfer is very slow and we neeed to show the user the record
incrementally
thats why we are doing this inside a loop with fill function
start,incrementally

and we have a janus grid adds the data row by row that makes the speed
horrbly

Esref DURNA





Patrice said:
I was more thinking about a compilable demo with data created by code so
that we can understand which keys are involved., see what you do when an
exception is raised etc...

Also have you tried to see if you have the same behavior if you fill the
whole table rather than looping...
--

Patrice

Esref DURNA said:
int start = 0;

try

{



int increment =1000;


MainTable.Clear();

DataSet ds=new DataSet();


ds=myDataSet.Clone();

do

{

ds.Tables[MainViewName].Clear();

this.MainTableDA.Fill(ds,start,increment,MainViewName);


int temp1=myDataSet.Tables[MainViewName].Rows.Count;

int temp2=ds.Tables[MainViewName].Rows.Count;



myDataSet.Merge(ds);


int temp3=myDataSet.Tables[MainViewName].Rows.Count;

int temp4=ds.Tables[MainViewName].Rows.Count;

start += increment;

}while (start == myDataSet.Tables[MainViewName].Rows.Count);



temp1 = 1000

temp2 = 1000

temp3 = 1978

temp4 = 1000



and yes we have identity column as primary key. this think is that if the
dataset becomes large it gives this error.

we are opening 20 40 tables without an error but only the big one gives
this bug!









----- Original Message -----
From: "Patrice" <[email protected]>
Newsgroups: microsoft.public.dotnet.framework.adonet
Sent: Wednesday, May 03, 2006 2:47 PM
Subject: Re: dataset merge bug!

The stange thing is that you don't always have the same results. Are you
sure you always starts from the same initial condition ? (do you have
deleted rows after a while for example in one or the other dataset ?)

I have no idea what you have tried for now but I would likely still
investigate this a bit. In particular you could see if you can repro
this in a consistant manner with the smallest possible code...

--
Patrice

"Esref DURNA" <[email protected]> a écrit dans le message de
%[email protected]...
my query returns 12000 rows

I m filling the dataset with increment size 5000
this.MainTableDA.Fill(ds,start,5000,MainViewName);

but when I merge two dataset with have 5000 rows it couse an error
sometimes it returns

shortly 5000 rows 5000 rows not equal to 10,000 rows. sometimes it have
7022 rows sometimes 65023 rows.

its not fixed.

the merge method is not working well

i think it is bacause merge method does not work well.

anyone have any idea?



Esref DURNA


Patrice said:
The stange thing is that you don't always have the same results. Are you
sure you always starts from the same initial condition ? (do you have
deleted rows after a while for example in one or the other dataset ?)

I have no idea what you have tried for now but I would likely still
investigate this a bit. In particular you could see if you can repro
this in a consistant manner with the smallest possible code...

--
Patrice

"Esref DURNA" <[email protected]> a écrit dans le message de
%[email protected]...
my query returns 12000 rows

I m filling the dataset with increment size 5000
this.MainTableDA.Fill(ds,start,5000,MainViewName);

but when I merge two dataset with have 5000 rows it couse an error
sometimes it returns

shortly 5000 rows 5000 rows not equal to 10,000 rows. sometimes it have
7022 rows sometimes 65023 rows.

its not fixed.

the merge method is not working well

i think it is bacause merge method does not work well.

anyone have any idea?



Esref DURNA
 
C

Cor Ligthert [MVP]

Esref,

What is strange (or that 65000 is not a typo) from this.

From identical keys is the data replaced
Form nonidentical keys the key is added and the data used.

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top