Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
516 views
in Technique[技术] by (71.8m points)

asp.net - Could not find installable ISAM. Server Error in '/' Application

I have a access database in web. This file is being uploaded in the web earlier. When I checked the same in web by file manager I could see the file. But when I am trying to read this file using this statement

con.ConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;
    Data Source=~httpdocsAdminAcessdatabaseATT2000.mdb;
    Persist Security Info=False;
    Jet OLEDB:Database Password=; 
    providerName=System.Data.OleDb";

it is giving me error as "Cannot find Instalble ISAM".

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I've encountered this error, and I've read this article back and forth but no vain.

Finally, I've understood that the trouble is something with the security. So, my solution was to use the local (default) mdw file (Microsoft Access Workgroup Information) like this:

string strConnectionString = 
    "Provider='Microsoft.Jet.OLEDB.4.0';Data Source=" + p_strFileName +
    ";Jet OLEDB:Database Password=" + p_strDBPassword +
    ";Mode=Share Exclusive;Persist Security Info=True;";

// Important part - using mdw file
strConnectionString += "Jet OLEDB:System Database=" + 
    Environment.GetEnvironmentVariable("APPDATA") + 
    @"MicrosoftAccesssystem.mdw";

and use the connection on code:

var conn = new OleDbConnection(strConnectionString);

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...