NEED HELP????? 
Author Message
 NEED HELP?????

You're so close....  Don't put aaa in single quotes:

data1.Connect = ";pwd=aaa"

--
Jon Pope
Coherent Technologies, Inc.
(Remove .NoSpam before Replying)


Quote:
> Hi!  Everybody

> How to use data control to open mdb file with password.

> Below is my code

> data1.connect="access;pwd='aaa'"
> data1.databasename="c:\aaa\aaa.mdb"
> data1.recordsource="aaa"
> data1.refresh

> Please Help me!!!

> THANKS!!!

> Spock



Mon, 17 Dec 2001 03:00:00 GMT
 NEED HELP?????

Boy, if I had a nickel for each time this question was asked...! :-)

You can't open a password protected database using the intrinsic data
control.  You have to open the recordset in code and then pass the recordset
to the data control's recordset property...something like this:

Dim vDB as Database
Dim vRS as Recordset
Set vDB = DBEngine.Workspaces(0).OpenDatabase(<database>, False, False,
";pwd=<password>")
Set vRS = vDB.OpenRecordset(<sql string or table name>, <parameters>)
Set Data1.Recordset = vRS.Clone
vRS.Close

Also, you want to remember to close the database ("vDB.Close") in your
form's unload event.

Manish


Quote:
> Hi!  Everybody

> How to use data control to open mdb file with password.

> Below is my code

> data1.connect="access;pwd='aaa'"
> data1.databasename="c:\aaa\aaa.mdb"
> data1.recordsource="aaa"
> data1.refresh

> Please Help me!!!

> THANKS!!!

> Spock



Mon, 17 Dec 2001 03:00:00 GMT
 NEED HELP?????
Hi!  Everybody

How to use data control to open mdb file with password.

Below is my code

data1.connect="access;pwd='aaa'"
data1.databasename="c:\aaa\aaa.mdb"
data1.recordsource="aaa"
data1.refresh

Please Help me!!!

THANKS!!!

Spock



Tue, 18 Dec 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. {Need Help Big Project Need Help}

2. Rookie needs help clearing the Clipper hurdle (DBase help needed)

3. HELP: Need help building a Decisoin tree help proggy

4. Help, Help, I need Help...!

5. NEED HELP WITH SQL SELECT STATEMENT - need to reference cookie info

6. Result Sets easy one I need help need Asap Please guys

7. Need help choosing Informix components for our needs .

8. Need help with SQL query - need to get two distinct values

9. For James re:special needs teacher needs help

10. Delete a group of data, NEED NEED Help

11. Special needs teacher needs help!!

12. Need help with query that needs Dynamic SQL, variables, and Temporary tables


 
Powered by phpBB® Forum Software