very new and unexpected Error with database

hi masters,

i am using dot net 2005 C# with sqlexpress, i have made connection and start inserting values to the tabels and its working fine.

BUT..

when i am close this application and restart again this application then there is no previous data i have checked using direct opening the tabels , no data found.

please help me

where data are going i like to know from you all




Answer this question

very new and unexpected Error with database

  • RussellReed

    is it happened... did u checked in the database where u inserted the values.... otherwise while inserting did u checked the int value return by executenonqueries is greater than zero.... check these two to make sure that it is inserted in to the database

  • MarkPlymouth

    If you are using a database file that is a resource in your project (and accessed via AttachDbFilename), by default VS will copy it around to several different places. Most significantly, it will copy the DB every time you execute the program in the debugger, to insure you have a consistent start state. You can select Copy If Newer instead of Copy Always to change this behavior.


  • gilstav

    Hi Ghanshyam Singh !

    Can post your code so that readers can see how you are saving data.

    Sohail.

     



  • Animine

    thankx

    actully few days ago i am doing the same application in 2003 with sql server 2000. And now i have converted the same applicition in2005 and i have not found the export option in 2005 , so that i have made new database and tabels with the same name as previous in 2003 .

    after all this i am facing this kind of probelum .

    i have checked the integer value it return 1 when i am inserting the value.

    i have also checked the file location, when i am entering value direct in the table, my code is also reading that entered value.

    i will send you the code tommorow becoz now i am in the caffe..

    pls yaar do someting.......



  • very new and unexpected Error with database