-
July 16th, 2001, 01:16 PM
#1
secur db
I have done some program that is working with access. How can I be sure that noone can Open this access file in access and change it.
-
July 16th, 2001, 02:12 PM
#2
Re: secur db
Look at the Help file in Access for MDE, if you save the database as an MDE file only VB apps can access the file
-
July 16th, 2001, 03:46 PM
#3
Re: secur db
I have save it like MDE, buth I can open it and change data in access?
-
July 16th, 2001, 04:12 PM
#4
Re: secur db
you need to set the password on the database. first you have to open it exclusively. to do this:
1) close the datbase if you have it open & make sure no other apps are using the database file
2) goto file and open, browse to your database file
3) highlight the database file and drop-down the open button on the open dialog and choose open exclusively.
now you can set the password under tools->security->set database password
now whenever the database file is opened you should be prompted for a passwd.
-obiwan
-
July 16th, 2001, 11:56 PM
#5
Re: access pword
When you open the database in code, you will have to set the password in your connection string. This will vary depending on how you access your database, but with an ADODB ConnectionString, you need "PWD=myPass" within the string, excluding the quotes. This is probably true for most other connection types.. if not, I've got a 1K page book on databases, so I can find out for you. dmbyer@i-techservices.com
=====
Dan
-
July 17th, 2001, 03:29 AM
#6
Re: access pword
I am using this code to open access, where shuld I type pwd.
Adodc1.ConnectionString = "provider=microsoft.jet.oledb.4.0;" & "persist security info=false;" & "data source=c:\caset.mdb"
Adodc1.RecordSource = "select*from 21Temp"
-
July 17th, 2001, 01:04 PM
#7
Re: access pword
Subject: Re: access pword
You'll have to register the database with the system. To do this, go to Settings>Control Panel then open up "ODBC Data Sources." If you don't have that control panel, look for an icon that has a big yellow "32" on it. If you still can't find it, chances are you don't have the control panel, which means you won't be able to use ODBC anyway. Taking into account that you do have it, click "Add..." once in the panel. Select "Microsoft Access Driver" then type in "caset" for the data source (excluding the quotes). Type anything you want for the description.. it doesn't matter. Now, under "Database" click "Select..." and find your caset.mdb database. Click ok. Voila, you now have an ODBC accessible database.
I'm not entirely clear on all the other stuff you had in there, but I can tell you now that it isn't required. But you can have it in there for safe measure, in any case. Just seperate your statements within the string with the semicolon, and you're fine. There's no need to concatenate the strings. Here's the entire thing in code.
Dim var1 as new ADODB.Connection
Dim var2 as new ADODB.Recordset
Dim var3
var1.ConnectionString = "DSN=caset;PWD=yourPWD"
var1.Open
var2.Open "select from * yourTable", var1, adOpenStatic, adLockOptimistic
'your code
I hope that helps.. ask again if it doesn't, or you have further problems.
=====
Dan
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|