|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
dataset merge bug!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 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" <esref_du***@microsoft.com> a écrit dans le message de news: %23THmGXqbGHA.3***@TK2MSFTNGP03.phx.gbl...Show quote > 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 > > > > > > > > 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" <scr***@chez.com> Newsgroups: microsoft.public.dotnet.framework.adonetSent: Wednesday, May 03, 2006 2:47 PM Subject: Re: dataset merge bug! Show quote > 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" <esref_du***@microsoft.com> a écrit dans le message de news: > %23THmGXqbGHA.3***@TK2MSFTNGP03.phx.gbl... >> 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" <scr***@chez.com> wrote in message news:O%23qvldqbGHA.3824@TK2MSFTNGP02.phx.gbl... > 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" <esref_du***@microsoft.com> a écrit dans le message de news: > %23THmGXqbGHA.3***@TK2MSFTNGP03.phx.gbl... >> 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 >> >> >> >> >> >> >> >> > > 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" <esref_du***@microsoft.com> a écrit dans le message de news: %23GhdEQ2bGHA.2***@TK2MSFTNGP05.phx.gbl...Show quote > 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" <scr***@chez.com> > 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" <esref_du***@microsoft.com> a écrit dans le message de >> news: %23THmGXqbGHA.3***@TK2MSFTNGP03.phx.gbl... >>> 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" <scr***@chez.com> wrote in message > news:O%23qvldqbGHA.3824@TK2MSFTNGP02.phx.gbl... >> 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" <esref_du***@microsoft.com> a écrit dans le message de >> news: %23THmGXqbGHA.3***@TK2MSFTNGP03.phx.gbl... >>> 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 >>> >>> >>> >>> >>> >>> >>> >>> >> >> > > 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 Show quote "Patrice" <scr***@chez.com> wrote in message news:O2UEF62bGHA.4032@TK2MSFTNGP02.phx.gbl... >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" <esref_du***@microsoft.com> a écrit dans le message de news: > %23GhdEQ2bGHA.2***@TK2MSFTNGP05.phx.gbl... >> 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" <scr***@chez.com> >> 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" <esref_du***@microsoft.com> a écrit dans le message de >>> news: %23THmGXqbGHA.3***@TK2MSFTNGP03.phx.gbl... >>>> 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" <scr***@chez.com> wrote in message >> news:O%23qvldqbGHA.3824@TK2MSFTNGP02.phx.gbl... >>> 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" <esref_du***@microsoft.com> a écrit dans le message de >>> news: %23THmGXqbGHA.3***@TK2MSFTNGP03.phx.gbl... >>>> 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 >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>> >>> >> >> > > I would need some code to repro what is happening. The fact you are getting
different results is disconcerting. -- Show quoteGregory A. Beamer ************************************************* Think Outside the Box! ************************************************* "Esref DURNA" <esref_du***@microsoft.com> wrote in message news:%23THmGXqbGHA.3352@TK2MSFTNGP03.phx.gbl... > 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 > > > > > > > > If the datasets have identical primary keys, it won't "add" but "update"
Jeff Show quote "Esref DURNA" <esref_du***@microsoft.com> wrote in message news:%23THmGXqbGHA.3352@TK2MSFTNGP03.phx.gbl... > 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 > > > > > > > > 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 Show quote "Esref DURNA" <esref_du***@microsoft.com> schreef in bericht news:%23THmGXqbGHA.3352@TK2MSFTNGP03.phx.gbl... > 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 > > > > > > > > |
|||||||||||||||||||||||