Help needed with filling database

  • Thread starter Thread starter tiger79
  • Start date Start date
T

tiger79

Hi,
i'm using SqlCe 2.0 to create and fill a database. The data that i need to
place in the database is formatted in 3 txt files. The database itself is
made out of 3 tables. So i got 1 file for every table.
My problem right now is that the first two tables are filled correctly, but
when the third one is filled nearly all data in the second table gets
deleted :(
I haven't programmed this anywhere so I'd like to know if this is some kind
of bug, or if someone else experienced this ?
At the beginning I thought this was because of the fact that two of those
tables are related with each other (through a Foreign Key) but even after I
made up the database without using any foreign key it still does this :(

ANy help is appreciated, cause i've been struggling with this a whole day
now...
 
tiger79 said:
Hi,
i'm using SqlCe 2.0 to create and fill a database. The data that i need to
place in the database is formatted in 3 txt files. The database itself is
made out of 3 tables. So i got 1 file for every table.
My problem right now is that the first two tables are filled correctly, but
when the third one is filled nearly all data in the second table gets
deleted :(
This sounds very weird. How are you verifying that tbles 1, 2 are 'filled
correctly'? And are you essentially saying that right after tbl 2 is
filled, you confirm the count on rows, verify everything, fill table3 and
that fill succeeds but now rows are missing from table 2? > I haven't
programmed this anywhere so I'd like to know if this is some kind
of bug, or if someone else experienced this ?
If that's the case it sounds like another thread may be hitting that
datatable but that's unlikely in that you are sure you didn't program this.
At the beginning I thought this was because of the fact that two of those
tables are related with each other (through a Foreign Key) but even after I
made up the database without using any foreign key it still does this :(

ANy help is appreciated, cause i've been struggling with this a whole day
now...


If it were a FK issue, you'd see an exception somewhere telling you that you
are voilating it, particuarly if tbl 3 is a child of 2. Just to be sure,
are you talking about datatable objects that you are filling and that are
losing rows, or the actual tables in CE?

Also, do you have any try catch blocks that don't do anything or just eat
the exception? Something's wrong here and you should be getting a
notification, so if you would, double check that.
--

W.G. Ryan, eMVP

http://forums.devbuzz.com/
http://www.knowdotnet.com/williamryan.html
http://www.msmvps.com/WilliamRyan/
 
Back
Top