-
April 12th, 2000, 11:29 AM
#1
ActiveX Data Object(database connection)
If the database is password protected than what changes are to be made in the syntaxes below.Please give the full syntax for connecting to databasehaving password......
Dim db As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Form_Load()
Dim sql As String
Set db = New ADODB.Connection
Set rs = New ADODB.Recordset
db.ConnectionString =
"Provider=Microsoft.Jet.OLEDB.3.51;Data Source=C:\Access\Studentdata.mdb"
db.Open
sql = "select * from student"
rs.Open sql, db, adOpenStatic
End Sub
-
April 12th, 2000, 11:54 AM
#2
Re: ActiveX Data Object(database connection)
Just append the password parameter to the end:
db.ConnectionString = "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=C:\Access\Studentdata.mdb;Password=yourpwd;"
db.Open
that should do it.
John
John Pirkey
MCSD
http://www.ShallowWaterSystems.com
http://www.stlvbug.org
John Pirkey
MCSD (VB6)
http://www.stlvbug.org
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
|