0

Im going to create a project with vb6 and ms access. I have to set password
to open the DB for security. In vb6, how can i connect the database in data environment through data link properties setting the provider,database and the database password?? If I can do this, are there any possible problems that will occur when I create and call commands in data environment?? Please help me. I urgently need this. Thank you..

3
Contributors
3
Replies
7
Views
9 Years
Discussion Span
Last Post by debasisdas
0

Set CN1 = New ADODB.Connection
CN1.CursorLocation = adUseClient

---------------------------------------------------------------------------------------
' This is a connect string for Access
CN1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source="c:\data\icd02.mdb"


'password entry
CN1.Properties("jet OLEDB:Database Password") = "charlyX"

0

Try this sample connection string.

oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
           "Data Source=c:\somepath\mydb.mdb;" & _ 
           "Jet OLEDB:Database Password=MyDbPassword", _
           "myUsername", "myPassword"
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.