【原】access数据库连接字符串

代码
  string  dbname = Server.MapPath( " data/db.mdb " ); 
                
string  sql  =   " select * from zuuser "
                OdbcConnection conn 
=   new  OdbcConnection(  " PROVIDER=Microsoft.Jet.OLEDB.4.0;DATA Source= " + dbname ); 

 

代码
        OleDbConnection con2  =   new  OleDbConnection( " Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|liutao.mdb;Persist Security Info=False;User Id=admin;Jet OLEDB:Database Password=liutao " );

 

你可能感兴趣的:(Access)