在高级那里:database password

解决方案 »

  1.   

    打开ConncetString编辑器,在高级那里:database password
      

  2.   

    Provider=Microsoft.Jet.OLEDB.4.0;Password=a;Data Source=D:\database\database.mdb;Persist Security Info=True
    连不上,报错“The Workgroup information is missing or opened exclusively by another user”
      

  3.   

    ACntMain.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;' +
        'User ID=Admin;' +
        'Data Source=' + ExtractFilePath(Application.ExeName) + 'data\dqx.mdb;' +
        'Mode=ReadWrite;Extended Properties="";' +
        'Jet OLEDB:System database="";' +
        'Jet OLEDB:Registry Path="";' +
        'Jet OLEDB:Database Password=administrator;' +  //HERE
        'Jet OLEDB:Engine Type=5;' +
        'Jet OLEDB:Database Locking Mode=1;' +
        'Jet OLEDB:Global Partial Bulk Ops=2;' +
        'Jet OLEDB:Global Bulk Transactions=1;' +
        'Jet OLEDB:New Database Password="";' +
        'Jet OLEDB:Create System Database=False;' +
        'Jet OLEDB:Encrypt Database=False;' +
        'Jet OLEDB:Don''t Copy Locale on Compact=False;' +
        'Jet OLEDB:Compact Without Replica Repair=False;' +
        'Jet OLEDB:SFP=False';
      

  4.   

    Advanced里没有dtatbase password啊?
      

  5.   

    Advanced里没有database password啊?
      

  6.   

    ACntMain.ConnectionString := 'Provider=Microsoft.Jet.OLEDB.4.0;' +
        'User ID=Admin;' +
        'Data Source=' + ExtractFilePath(Application.ExeName) + 'data\dqx.mdb;' +
        'Mode=ReadWrite;Extended Properties="";' +
        'Jet OLEDB:System database="";' +
        'Jet OLEDB:Registry Path="";' +
        'Jet OLEDB:Database Password=*****;' +  //HERE
        'Jet OLEDB:Engine Type=5;' +
        'Jet OLEDB:Database Locking Mode=1;' +
        'Jet OLEDB:Global Partial Bulk Ops=2;' +
        'Jet OLEDB:Global Bulk Transactions=1;' +
        'Jet OLEDB:New Database Password="";' +
        'Jet OLEDB:Create System Database=False;' +
        'Jet OLEDB:Encrypt Database=False;' +
        'Jet OLEDB:Don''t Copy Locale on Compact=False;' +
        'Jet OLEDB:Compact Without Replica Repair=False;' +
        'Jet OLEDB:SFP=False';
      

  7.   

    snakeguo(枫) ,这里面个句都是什么意思?我需要写哪句啊?谢谢~
      

  8.   

    snakeguo(枫) ,没有,我确定我关掉Access了,没有任何程序在占用
      

  9.   

    我记错了,应该在"所有"那里
    就是//HERE那句
      

  10.   

    对access文件加密.即程序开始运行时.用TFileStream读取指定长度的字节是否为,提前写入的
    数据,如果是则
       begin
       数据库没有被非法更改.
       用TFileStream读取指定长度的字节(即加密点) 通过自己的算法还原.写回数据库(或生成临时数据库).
       连接数据库.
       end;
    退出时:
      删除临时库或(加密数据库
    或者不用密码,用权限,在登登陆时存On_load加入
    Option Compare Database
    Sub SetStartupProperties()
    Const DB_Text As Long = 10
    Const DB_Boolean As Long = 1
        ChangeProperty "StartupForm", DB_Text, "Customers"
        ChangeProperty "StartupShowDBWindow", DB_Boolean, False
        ChangeProperty "StartupShowStatusBar", DB_Boolean, False
        ChangeProperty "AllowBuiltinToolbars", DB_Boolean, False
        ChangeProperty "AllowFullMenus", DB_Boolean, True
        ChangeProperty "AllowBreakIntoCode", DB_Boolean, False
        ChangeProperty "AllowSpecialKeys", DB_Boolean, True
        ChangeProperty "AllowBypassKey", DB_Boolean, True
    End SubFunction ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
        Dim dbs As Object, prp As Variant
        Const conPropNotFoundError = 3270    Set dbs = CurrentDb
        On Error GoTo Change_Err
        dbs.Properties(strPropName) = varPropValue
        ChangeProperty = TrueChange_Bye:
        Exit FunctionChange_Err:
        If Err = conPropNotFoundError Then    ' 找不到属性。
            Set prp = dbs.CreateProperty(strPropName, _
                varPropType, varPropValue)
            dbs.Properties.Append prp
            Resume Next
        Else
            ' 未知的错误'。
            ChangeProperty = False
            Resume Change_Bye
        End If
    End Function
    Private Sub Command0_Click()
    On Error GoTo Err_Command0_Click
        DoCmd.CloseExit_Command0_Click:
        Exit SubErr_Command0_Click:
        MsgBox Err.Description
        Resume Exit_Command0_Click
        
    End Sub
    Private Sub Command1_Click()
     ChangeProperty "AllowBypassKey", DB_Boolean, True
     
          
            If Me!UesrName = "wyn" And Me!Password = "085477" Then
              
            Else
               MsgBox "密码错误"
            End If
        
    End Sub
    Private Sub Command2_Click()
        ChangeProperty "AllowBypassKey", DB_Boolean, Flase
        DoCmd.Close
    End SubPrivate Sub Form_Load()
    ChangeProperty "AllowBypassKey", DB_Boolean, False
    End Sub
      

  11.   

    snakeguo(枫),OK了,谢谢~马上给分。
      

  12.   

    xiejiye(雏鹰) ,谢谢你,我好好学习学习~
      

  13.   

    xiejiye(雏鹰) 你真是我们的好榜样啊