你连接数据库用的是用户名,密码还是集成windows验证?

解决方案 »

  1.   

    string strDBPath="test.mdb"; 
    string strConn="provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + strDBPath; 
    OleDbConnection oConn=new OleDbConnection(strConn); 
    if(oConn.State==ConnectionState.Closed) 
    oConn.Open(); 
    string strSql="Select * from 登录表"; 
    OleDbCommand cmd=new OleDbCommand(strSql,oConn); 
    OleDbDataReader dr=cmd.ExecuteReader();
    while(dr.Read())
    {
    textBox1.Text=dr[0].ToString();
    textBox2.Text=dr[1].ToString();
    } oConn.Close();
      

  2.   

    你的aspnet用户账户必须要有mdb文件的读权限,
    看一下ntfs的权限。
      

  3.   

    现在是在别人的机上出问题啊,我的机运行过程没有问题,是不是要在别的机上改那个ntfs权限?还有应该怎么改呢?
      

  4.   

    对了,我做的是winform不是webform,怎么会跟asp.net有关系?