locked
Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt. RRS feed

  • Question

  • User190827251 posted

    Hi,

    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?

    Wednesday, February 23, 2011 12:18 AM

All replies

  • User3866881 posted

    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

    THX again!

    :)

    Thursday, February 24, 2011 8:46 PM
  • User1867929564 posted

    i) Connection is not properly open and close.thoroughly check your code.

    http://www.access-programmers.co.uk/forums/showthread.php?t=63434

    http://forums.asp.net/t/1240624.aspx 

    Friday, February 25, 2011 12:17 AM