Groups > Databases > Access Databases and AccessDataSource Control > Re: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.




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

Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
Mon, 31 Mar 2008 04:45:59 +000
Hiiiiiiiiiiiiii,I've problem with my program, after i want insert data i got
error "Cannot open database ''. It may not be a database that your
application recognizes, or the file may be corrupt." For connection i using
this code 



 1    Imports System.Data
2    Imports System.Data.OleDb
3    
4    Namespace AccessData
5    
6        Public Class DatabaseConnection


8            Dim conect As New
OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\" +
ServerName + "\data\HelpDesk\HelpDesk_Data.mdb;Jet OLEDB:Database
Password=HELPDESK; ") 'OleDbConnection   From Microsoft
9            Public Function open() As OleDbConnection
10               conect.Open()
11               Return conect
12           End Function
13   
14           Public Function close() As OleDbConnection
15               conect.Close()
16               Return conect
17           End Function
18   
19       End Class
20   
21   End Namespace
 

Please advise..

Thanks
Post Reply
Re: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
Mon, 31 Mar 2008 05:43:24 +000
Boedax's Malay:after i want insert data i got 

Does that mean you can read from the database and have a problem inserting?

If so, it may be that the application (IIS) does not have write permissions to
the file/directory on the server.  

Can you open and manipulate the data with MSAccess?
Post Reply
Re: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
Mon, 31 Mar 2008 06:34:47 +000
SGWellens:

Boedax's Malay:after i want insert data i got 

Does that mean you can read from the database and have a problem inserting?

If so, it may be that the application (IIS) does not have write permissions to
the file/directory on the server.  

Can you open and manipulate the data with MSAccess?



I can read data before inserting. then i give permission to everyone.

also i can open and manipulate data directly in access..

Thanks
Post Reply
Re: Cannot open database ''. It may not be a database that your application recognizes, or the file may be corrupt.
Tue, 1 Apr 2008 00:46:09 +0000
Compact and Repair the database first.  If that doesn't fix it, you may have to
re-install Jet.
http://www.microsoft.com/downloads/details.aspx?familyid=2deddec4-350e-4cd0-a12a
-d7f70a153156&displaylang=en
Post Reply
about | contact