473,624 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

connecting to password protected backend.mdb in VBA

I have a frontend that has some tables which are linked to a backend.
Now I want to make the backend password protected and when I try to
run it password protected I can't open it. In the first form that
opens in the front end, I added the following to the form_open event:

Dim cnn As ADODB.connectio n

Set cnn = New ADODB.connectio n
cnn.Provider = "Microsoft.Jet. OLEDB.4.0"
cnn.Properties( "Data Source") = "C:\backend.mdb "
cnn.Properties( "Jet OLEDB:Database Password") = "password"
cnn.Open
Set cnn = Nothing

It seems like it is running the code but not opening up the links or
not keeping the connection open. After I run this code and I click on
one of the linked tables I get the message "Not a valid password". How
can I get it to work as if there was no password on the backend?

Thanx,
Chris
Nov 12 '05 #1
1 3966
Chris wrote:
I have a frontend that has some tables which are linked to a backend.
Now I want to make the backend password protected and when I try to
run it password protected I can't open it. In the first form that
opens in the front end, I added the following to the form_open event:

Dim cnn As ADODB.connectio n

Set cnn = New ADODB.connectio n
cnn.Provider = "Microsoft.Jet. OLEDB.4.0"
cnn.Properties( "Data Source") = "C:\backend.mdb "
cnn.Properties( "Jet OLEDB:Database Password") = "password"
cnn.Open
Set cnn = Nothing

It seems like it is running the code but not opening up the links or
not keeping the connection open. After I run this code and I click on
one of the linked tables I get the message "Not a valid password". How
can I get it to work as if there was no password on the backend?


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

The reason it is not keeping the connection open is that you are closing
the connection: "Set cnn = Nothing" closes the connection.

Guess:

Try declaring (Dim) the connection variable in the Declarations section
of the form's module & run the above code (excluding the Dim cnn ... &
Set cnn = nothing) in the Form_Open procedure. In the Form_Close
procedure run the Set cnn = Nothing.

Another Guess:

The connection string of linked tables contains the password in plain
text. Using DAO you can programatically change the linked TableDefs'
connection strings to include the password (;Pwd=password) &
..RefreshLink the TableDef.

--
MGFoster:::mgf0 0 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQH2XDYechKq OuFEgEQJy2gCgvZ GRi5h3BtUDlLC2o 08L8ZFv4FAAnRCE
4cYtkXrXaMeskjS S0xu614WE
=VluH
-----END PGP SIGNATURE-----

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
1768
by: ifeoma | last post by:
I have a frontend mdb which has tables linked to a backend. When I put a password on the backend, it can't connect at the frontend. How do I get around this? Thanx, Chris
4
427
by: Chris | last post by:
I have a frontend that has some tables which are linked to a backend. Now I want to make the backend password protected and when I try to run it password protected I can't open it. In the first form that opens in the front end, I added the following to the form_open event: Dim cnn As ADODB.connection Set cnn = New ADODB.connection cnn.Provider = "Microsoft.Jet.OLEDB.4.0" cnn.Properties("Data Source") = "C:\backend.mdb"
3
6302
by: Chris | last post by:
I have a frontend that has some tables which are linked to a backend. Now I want to make the backend password protected and when I try to run it password protected I can't open it. In the first form that opens in the front end, I added the following to the form_open event: Dim cnn As ADODB.connection Set cnn = New ADODB.connection cnn.Provider = "Microsoft.Jet.OLEDB.4.0" cnn.Properties("Data Source") = "C:\backend.mdb"
1
436
by: Chris | last post by:
I have a frontend that has some tables which are linked to a backend. Now I want to make the backend password protected and when I try to run it password protected I can't open it. In the first form that opens in the front end, I added the following to the form_open event: Dim cnn As ADODB.connection Set cnn = New ADODB.connection cnn.Provider = "Microsoft.Jet.OLEDB.4.0" cnn.Properties("Data Source") = "C:\backend.mdb"
3
1969
by: Tony | last post by:
G'day, With a (Access 2003) database that is split (frontend application and backend datatables) how can I 'pass' a password from the frontend that allows access to the datatables which are secured by the tables. Tony
4
2673
by: Geir Baardsen | last post by:
Hi! 1. I wonder if there is a possibility to open a BackEnd.Db from the opening form, the form e.g.: frmOrders, in the FrontEnd.Db, when the BackEnd.Db is password protected? 2. Do I need to do this with all forms, or can I somehow have a refreshing links function that at the same time pass the password to the linked tables in the BackEnd.Db? The password is set only for opening the database itself, no grouping
6
2742
by: Mike | last post by:
I have developed a program that has the backend on a server and multiple users have the front end at their individual computers. I know how to set a password on the backend. How can I implement the requirement for entry of this password for each user as they sign in on the front end? Thank you for the help in advance Mike
4
7562
by: kthiagar | last post by:
Hi I am trying to connect to a password protected access file from VB.NET. I have no problem in connecting to Access, if I remove the password. This is what I am doing: In the server explorer, I choose "Add a connection" Choose "Microsoft Jet 4.0 OLEDB Provider" in the provider tab Selected the access file in the next tab Left Username as Admin and typed the password. Now when I try to test connection, I am getting this error message:
0
1396
by: vanwout | last post by:
Hello, An ASP page on my IIS server converts an uploaded word document to HTML, but I'm having a problem with it failing (hanging and popup requesting password on server!) on password protected word documents. (web upload, backend processing and web delivery) I spent the whole day on google to find a solution. What I am looking for is an asp script or a property that can look at a word document and just return a yes or no as to...
0
8179
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8631
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8490
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6112
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5570
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4184
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2612
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1489
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.