Open Access table with Password

  • Thread starter Thread starter Nuno
  • Start date Start date
Are you saying you dont have the password, or you dont know how to pass it
in the connection string ?

Regards - OHM
 
I Dont know hot to pass it...
-----Original Message-----
Are you saying you dont have the password, or you dont know how to pass it
in the connection string ?

Regards - OHM



.
 
You will find that the connection stringfor the connector will look
something like this, just put the Database Password= entry in and hopefully
it will work.

Regards - OHM



Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet
OLEDB:Database Locking Mode=1;Jet OLEDB:Database Password=;Data
Source="C:\Documents and Settings\Administrator\My
Documents\FamilyPlusFriends.mdb";Password=;Jet OLEDB:Engine Type=5;Jet
OLEDB:Global Bulk Transactions=1;Provider="Microsoft.Jet.OLEDB.4.0";Jet
OLEDB:System database=;Jet OLEDB:SFP=False;Extended Properties=;Mode=Share
Deny None;Jet OLEDB:New Database Password=;Jet OLEDB:Create System
Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet
OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt
Database=False
 
When i try to open it...i give me this message "COULD NOT
FIND INSTALLABLE ISAM"

Can you help me...?
 
THERES THE CODE...IM NOT SURE IF I CAN DO LIKE THIS...
IM REALLY CONFUSE...
Thanks...

Function OpenTable() As DataSet
Dim strDSN As String
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\Conversao\Optiware98.MDB;pwd=et98jif%Znf[2)"
Dim strSQL As String = "SELECT * FROM Clientes"
Dim Conn As OleDbConnection
Dim DA As OleDbDataAdapter
Dim Ds As DataSet

Ds = New DataSet()
Conn = New OleDbConnection(strDSN)
DA = New OleDbDataAdapter(strSQL, Conn)

Try
DA.SelectCommand.CommandType =
CommandType.StoredProcedure

DA.Fill(Ds, "Mensagens")

Return Ds

Catch e As Exception
MessageBox.Show(e.Message)
Finally
Conn.Close()
End Try

End Function
 
Hi Nuno,

Can you try it with these changes, and if it does not work, cut that pwd
part again from it and try it again.

I hope this does work?

Cor
Function OpenTable() As DataSet
Dim strDSN As String
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\Conversao\Optiware98.MDB;pwd=et98jif%Znf[2)"
Dim strSQL As String = "SELECT * FROM Clientes"
Ds = New DataSet()
Dim Conn As New OleDbConnection(strDSN)
Try
Dim cmd As New OleDbCommand(strSQL, Conn)
da = New OleDbDataAdapter(cmd)
da.Fill(ds, "Mensagens")
Return ds
Catch oledbExc As OleDbException
MessageBox.Show(oledbExc.ToString)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
Conn.Close()
End Try
 
It Still give the same error...
The pwd is the password of the table...
but thanks for your efforts...

-----Original Message-----
Hi Nuno,

Can you try it with these changes, and if it does not work, cut that pwd
part again from it and try it again.

I hope this does work?

Cor
Function OpenTable() As DataSet
Dim strDSN As String
= "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\Conversao\Optiware98.MDB;pwd=et98jif%Znf[2)"
Dim strSQL As String = "SELECT * FROM Clientes"
Ds = New DataSet()
Dim Conn As New OleDbConnection(strDSN)
Try
Dim cmd As New OleDbCommand(strSQL, Conn)
da = New OleDbDataAdapter(cmd)
da.Fill(ds, "Mensagens")
Return ds
Catch oledbExc As OleDbException
MessageBox.Show(oledbExc.ToString)
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
Conn.Close()
End Try



.
 
I think this is typically caused by a bad connection string. One common
error is not putting a space in Data Source. In case of word wrap, that
should read Data Source.
 
¤ How can i open a Access Table that have a password?
¤ Can somebody help me?

Assuming you mean database password?

strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=e:\My Documents\db2.mdb;" & _
"Jet OLEDB:Database Password=password"


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 
Back
Top