none
access db suddenly deletes all the table content RRS feed

  • Question

  • Hi,

     I am working about a C# windows application project which uses an acces database. When I try to execute an oledbcommand all the table content suddenly disappears. However, this situation happens with some commands, the others works fine. For example, there is a table with name tbl_customer and data fields id, name, surname. If I create a stored procedure like ("parameters id long; select tbl_customer.id, tbl_customer.name from tbl_customer where tbl_customer.id = id;") and execute this procedure tbl_customer content will be deleted. I am sure, I have made the other works correctly like opening a connection, executing a query etc. because when I try to execute an insert stored procedure it works fine ("parameters name text(255), surname text(255); insert into tbl_customer (name, surname) values(name, surname)"). Also, when I try to execute first procedure in access it works fine again, but when I  compile and execute the project in visual studio it deletes all the tbl_customer content and also deletes the stored procedure so the visual studio gives an exception <storedProcedure1 cannot be found>. Where may be my mistake?

    Monday, December 17, 2007 6:18 PM