Last post Feb 25, 2011 12:17 AM by KumarHarsh
Feb 23, 2011 12:18 AM|turkush|LINK
My two apps, one main and one sync is running at same time. Let say 5 out of 20 time i get this error message:
Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
my db file size is not big. I have even less than 100 rows in each table.
I got this message on con.Open line. when i drag the debugging control from exception block to con.open again, this time it runs fine. Any idea?
Feb 24, 2011 08:46 PM|Decker Dong - MSFT|LINK
According to your description,as far as I know, there are two ways you can consider:
1) Please check whether your db's isn't destoried by something like virus or something exceptions.
2) And sometimes I think if you put your db into a compressed disc or a folder, you cannot attach it to the SQL or sometimes you cannot open them. So please make sure that your db is in a normal disc or a folder, if not, please uncompress them first and
call Open or attach or do something else :)
PS：Please write down your type of your db (like SQL,ACCESS……)
And the problem happends to which statement (by debugging) and your error information
Feb 25, 2011 12:17 AM|KumarHarsh|LINK
i) Connection is not properly open and close.thoroughly check your code.