0

Look, I'm working and doing tests with Access databases in Visual Basic.

I created an access database, and place it in the bin / debug folder of the project. Without assigning a password , it connects sucesfully with the database ... but when I encrypt the database (or put a password to the database with exclusively mode), my connection fails:

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
    Dim tabla As DataTable = New DataTable
    Dim ds As DataSet = New DataSet
    Dim conexion As New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=soq.accdb;Persist Security Info=False;Jet OLEDB:Database Password=mypassword;")
    Try
        conexion.Open()
        MsgBox("Estoy operando.")
    Catch ex As Exception
        MsgBox("No ando haciendo eso")
    End Try
    conexion.Close()
End Sub

Whats the problem here?? I wrote something wrong??? (I got Microsoft Access 2013)

Erik A
  • 31,639
  • 12
  • 42
  • 67
TwoDent
  • 405
  • 7
  • 26

1 Answers1

0

Okay guys, i found the solution!

The encryption method of Microsoft Access 2013 dont works properly. So my solution was simple: Use the encryption method of the 2007 version, and done!

Thanks all!

TwoDent
  • 405
  • 7
  • 26