|
-
Jan 9th, 2003, 03:25 PM
#1
Thread Starter
Sleep mode
database password !!
Hi ,
I wanna open protected database (access 97 ) .I tried this but seems not hlep :
VB Code:
Dim myPath As String = Application.StartupPath
Dim myConnection As New OleDb.OleDbConnection("provider=Microsoft.jet.oledb.4.0;DATA SOURCE=" _
& myPath & "\DBWEB.MDB;" & "Jet OLEDB: Database Password=" & "mypassword;")
Try
myConnection.Open()
Catch x As Exception
MsgBox(x.Message())
'It keep throwing this error :
couldn't find installable ISAM.
End Try
Any hlep would be highly appreciated !
-
Jan 9th, 2003, 03:43 PM
#2
Frenzied Member
This is a good resource: ConnectionStrings.com
I use this in my code:
VB Code:
Public Const ACCESS2K = "Provider=Microsoft.Jet.OLEDB.4.0;Password='';User ID=Admin;Data Source='C:\myData.mdb';"
~Peter

-
Jan 9th, 2003, 04:13 PM
#3
Thread Starter
Sleep mode
that's wonderful site ! Many thanks .I will try to solve the problem.
-
Jan 10th, 2003, 11:58 AM
#4
Thread Starter
Sleep mode
what happens then if the path was a const as follow :
VB Code:
Dim path As String = "C:\db1.mdb"
'I tried this but with error of course
Dim MyConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source= path;Jet OLEDB:Database Password=aaa;")
this time ,the path is throwing an error. any ideas plz ??
-
Jan 10th, 2003, 12:12 PM
#5
Frenzied Member
Did you forget how to use a variable?
VB Code:
Dim sDBPath As String = "C:\db1.mdb"
Dim MyConnection As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source='" & sDBPath & "';Jet OLEDBatabase Password=aaa;")
I'm sure it was just a momentary brain lapse.
~Peter

-
Jan 10th, 2003, 12:16 PM
#6
Thread Starter
Sleep mode
hehe . thanx thanx . Dunno what's wrong with my PC recently(actually it me not my PC).
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|