PC Review


Reply
Thread Tools Rate Thread

Coonect to access with password

 
 
kalle
Guest
Posts: n/a
 
      23rd Nov 2009


Hi.

I use this code to connect to my database at work.

Set con = New ADODB.Connection
con.Provider = "Microsoft.Jet.OLEDB.4.0"
con.Open ThisWorkbook.Path & "\my.mdb"

Now I want to protect the database with a password. But it does't work.
Can anyone help me?

Thanks in advance

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
 
Tim Williams
Guest
Posts: n/a
 
      24th Nov 2009
dim cs as string
Set con = New ADODB.Connection

cs = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
ThisWorkbook.Path & "\mydb.mdb;" & _
"Jet OLEDBatabase Password=YourPasswordGoesHere;"

con.Open cs

http://www.connectionstrings.com/access

Tim

"kalle" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>
>
> Hi.
>
> I use this code to connect to my database at work.
>
> Set con = New ADODB.Connection
> con.Provider = "Microsoft.Jet.OLEDB.4.0"
> con.Open ThisWorkbook.Path & "\my.mdb"
>
> Now I want to protect the database with a password. But it does't work.
> Can anyone help me?
>
> Thanks in advance
>
> *** Sent via Developersdex http://www.developersdex.com ***



 
Reply With Quote
 
kalle
Guest
Posts: n/a
 
      24th Nov 2009


Thanks for the reply!

It works fine. Thought I tried this before but i must have done
something wrong then.

If someone have time to help me i have one more question.

I have my db-file on a network and i want to put my database in a folder
there noone else but me has writing rights.

Of course I want other users to be able ot connect to my database, but
how do i do that?

Is it possible at all?

I have heard somthing about a mdw-file but how do I create such file?

Thanka in advance

Kalle

*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot Coonect to the internet after Startup when using a USD Hard =?Utf-8?B?RnJhc2Vy?= Windows Vista Networking 3 4th Aug 2007 03:15 PM
Windows Fax and Scan - Coonect to a Fax Server on my Network =?Utf-8?B?Sm9l?= Windows Vista Print / Fax / Scan 5 5th Jul 2007 10:30 AM
Withera.exe keeps asking to coonect to the web? Big Dave Windows XP Help 6 28th Dec 2005 02:01 AM
XP can't coonect w2003 server using VPN =?Utf-8?B?SmFtZXM=?= Windows XP Networking 0 21st Jan 2005 03:55 AM
can't coonect to Internet by URL. I can connect using IP address Lena Miloslavsky Windows XP Networking 1 3rd Sep 2003 01:57 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:59 AM.