VB6/Access Connection Opening

Hi All Experts,

I have developed one application using VB6/Access 2000 platform. In that, I have secured the database by using "Set Database Password...". I can open this Password protected database connection using following string.

.provider = "Microsoft.Jet.OLEDB.4.0;"
.properties{"Jet.OLEDB:Password"}="password"
.open app.path & "\filenm.mdb"

Now my problem is when I run this application on MS Access 2003 XP Professional, it gives an error for "not valid password" & also gives an error for ".Provider". Actually ".provider" property doesn't support.

I will be very thankful if somebody can give the best solution.

Thanks in advance.
jitu_r_soniAsked:
Who is Participating?
 
pradapkumarCommented:
Are you able to connect thru ADODB Active X control?
If so, try to Build COnnection string from there if it succeeded the test then copy the exact connection string from there to your project.

Wish u all the best.
N.Pradap Kumar
0
 
leclairmCommented:
Try:

YourConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" app.path & "\filenm.mdb"
 & ";Jet OLEDB:Database Password=password;"
0
 
leclairmCommented:
Sorry, forgot an "&"

YourConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & app.path & "\filenm.mdb"
 & ";Jet OLEDB:Database Password=password;"
0
 
abdulhameedsCommented:
try this

Public ACCDB As Database
Public GLLCSYSDB As Database

 GL_pBDbs = "c:\" & "ACCOUNT.mdb"
     GL_pBDbs1 = "c:\" & "ACCOUNT.mdb"
   Set ACCDB = Workspaces(0).OpenDatabase(GL_pBDbs, False, False, ";pwd=ACC1999")
   Set GLLCSYSDB = Workspaces(0).OpenDatabase(GL_pBDbs1, False, False, ";pwd=ACC1999")

i use it in my application
0
 
leclairmCommented:
Here's an article that might be of interest to you:

http://support.microsoft.com/kb/303528/

Could it be the version of MDAC that it was compiled with ?!?!?

I know 2.6 and higher don't include the access odbc driver, but that doesn't seem to be the issue here.

Going back to DAO definitely isn't the answer! ;)
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.