Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

I haven't bother with setting password on databases before and am giving it a go now, but get an error message:

 

"cannot find installable ISAM"

 

this was my connection string before setting the password:

 


gconnConnection = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\carl\My Documents\Sol\rs.mdb;Persist Security Info=False")

 

And this is it including the password being pased to the string:

 


gconnConnection = ("Provider=Microsoft.Jet.OLEDB.4.0;Database password=" & Me.txtPassword.Text & ";Data Source=C:\Documents and Settings\carl\My Documents\Sol\rs.mdb;Persist Security Info=False")

 

all help gratefully received :)

My website
  • Leaders
Posted

       Dim Connection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db3.mdb;Jet OLEDB:Database Password="your password";User ID=Admin;Persist Security Info=True"

 

 

eg :

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       Dim Connection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db3.mdb;Jet OLEDB:Database Password=dynamic_sysop;User ID=Admin;Persist Security Info=True"
       Dim Command As String = "SELECT * FROM Table1"
       OpenAccessFile(Connection, Command)
   End Sub

   Private Sub OpenAccessFile(ByVal strConnection As String, ByVal strCommand As String)
       Try
           Dim objDbConnection As New OleDbConnection(strConnection)

           objDbConnection.Open() '///open a new connection.

           Dim objCommand As New OleDbCommand(strCommand, objDbConnection)
           Dim objAdaptor As OleDbDataAdapter
           objAdaptor = New OleDbDataAdapter(objCommand)
           Dim objDataSet As New DataSet()
           objAdaptor.Fill(objDataSet, "Table1")
           DataGrid1.DataSource = objDataSet.Tables("Table1") '///fill a datagrid with the recordset

           objDbConnection.Close()
           objCommand.Dispose()
           objAdaptor.Dispose()
           objDataSet.Dispose()
       Catch ex As Exception
           MsgBox(ex.Message)
       End Try
   End Sub

  • Leaders
Posted

grrrr at how the vb code function messes up code :mad:

Dim Connection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\db3.mdb;Jet OLEDB:Database Password=password here;User ID=Admin;Persist Security Info=True"

 

see if this shows :-\

Posted

Doh!

 


gconnConnection = ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Documents and Settings\carl\My Documents" & _
                          "\Sol\rs.mdb;Jet OLEDB Database Password=" & Me.txtPassword.Text & _
                          "User ID=Admin;Persist Security Info=True")

 

still results in "Could not find installable ISAM":(

My website
  • Leaders
Posted

you need a : between OLEDB and Database ( it wont show up in here cuz it thinks it's an icon

       Dim strConnect As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C : \db3.mdb;Jet OLEDB : Database Password=myPassword;User ID=Admin;Persist Security Info=True"

without the space between OLEDB : Database

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...