hog Posted July 14, 2003 Posted July 14, 2003 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 :) Quote My website
Leaders dynamic_sysop Posted July 14, 2003 Leaders Posted July 14, 2003 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 Quote
Leaders dynamic_sysop Posted July 14, 2003 Leaders Posted July 14, 2003 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 :-\ Quote
hog Posted July 14, 2003 Author Posted July 14, 2003 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":( Quote My website
Leaders dynamic_sysop Posted July 14, 2003 Leaders Posted July 14, 2003 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 Quote
Leaders dynamic_sysop Posted July 14, 2003 Leaders Posted July 14, 2003 i've put a sample together for you , it may be easier , because certain chars dont show to good on here :-\windowsapplication19.zip Quote
hog Posted July 14, 2003 Author Posted July 14, 2003 Whooooa!! I thank you:):):) hog:) Quote My website
zaaterah Posted April 30, 2006 Posted April 30, 2006 Thanks Great Help thank you very very much Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.