Access password gets deleted -
I'm fairly sure that Microsoft hates me. Why else would I
have this silly little problem that is giving me so many
headaches? I use the following code (i found this example
here on these boards) to compact an Access 2000 database.
But it DELETES THE M.F*ING PASSWORD

! I have the user
enter the password in a textbox and pass it in as a
variable. It works to open the database but does not copy
the password to the newly compacted database. ¿¿WHY??
Code:
Private Sub cmdCompactar_Click()
On Error GoTo Database_Error
Dim objJRO As JRO.JetEngine
Dim strDBSource As String, strDBDestination As String
Dim strConnSource As String, strConnDestination As String
Dim fsObject As Variant
Dim i As Single
strDBSource = txtDatabase
If strDBSource = "" Then
MsgBox "Debe seleccionar un base de datos antes de continuar.", vbExclamation
cmdDatabase_Click
Exit Sub
ElseIf Dir(strDBSource) = "" Then
MsgBox "La ruta de acesso está invalido.", vbCritical
txtDatabase = ""
cmdDatabase.SetFocus
Exit Sub
End If
If MsgBox("Está a punto a compactar el base de datos" & Chr(13) & Chr(10) & _
Chr(13) & Chr(10) & strDBSource & Chr(13) & Chr(10) & _
Chr(13) & Chr(10) & "Antes de continuar, debe cerrar todos los " & Chr(13) & Chr(10) & _
"applicaciones que están utalizando este " & Chr(13) & Chr(10) & _
"base de datos. ¿Desea continuar?", vbYesNo) = vbNo Then
Exit Sub
End If
Me.MousePointer = vbHourglass
DoEvents
Set fsObject = CreateObject("Scripting.FileSystemObject")
strDBDestination = fsObject.GetParentFolderName(strDBSource) & "\db1.mdb"
i = 2
Do Until Dir(strDBDestination) = ""
strDBDestination = fsObject.GetParentFolderName(strDBSource) & "\db" & i & ".mdb"
Loop
strConnSource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBSource & ";Jet OLEDB:Database Password=" & txtClave
strConnDestination = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBDestination
'instantiate object
Set objJRO = Nothing
Set objJRO = New JRO.JetEngine
'compact database from source to destination
objJRO.CompactDatabase strConnSource, strConnDestination
'release objects
Set objJRO = Nothing
Set fsObject = Nothing
Kill strDBSource
Name strDBDestination As txtDatabase
Me.MousePointer = vbDefault
DoEvents
MsgBox "El base de datos ha sido compactado con éxito.", vbInformation
Exit Sub
Database_Error:
Me.MousePointer = vbDefault
DoEvents
'release objects
Set objJRO = Nothing
Set fsObject = Nothing
Select Case Err.Number
Case -2147217843 'bad password
MsgBox "Clave inválido", vbExclamation
If chkClave.Value = vbChecked Then
txtClave.SetFocus
Else
chkClave.Value = vbChecked
End If
Case Else
MsgBox "Error en base de datos." & Chr(13) & Chr(10) & _
Chr(13) & Chr(10) & Err.Description, vbCritical
txtDatabase = ""
cmdCompactar.Enabled = False
cmdDatabase.SetFocus
If Dir(strDBDestination) <> "" Then Kill strDBDestination
End Select
End Sub
[Edited by DrewDog_21 on 09-21-2000 at 07:20 PM]
[2005] Password-Setting Issue -
I am creating an application that protects your computer from getting accessed except for you. So, I have come down to making a password to change settings and whatnot.
I have implemented password detection, password loading, password setting, and whatnot, but there is one final pro
Access password problems -
I have a big issue with access passwords. I know how to get a table password but as I was changing
things in access security group in access I must have changed the whole access application password
because I can not even get into access with out this password. As a smart person,
Access the Session in a class -
I have added a class to my project and can't access the Session variable. How can I get access to it?
I have a SqlDatabase class which reads my connection string from ConfigurationSettings.AppSettings("dbCon") and that works fine. I have a login page to get the userid an
validate Access 2000 password -
I am looking for a way to validate an Access 2000 password programically. Basically I would like the function to take two arguments (mdbFilePath and Password) and return true or false to indicate whether or not the password supplied is the correct password. I do not want it to actually
[2005] Connection with a password secured MS-Access -
Hi
I have created a password on an access file.
Now when I give the connection dtring like this:
Provider=Microsoft.Jet.OLEDB.4.0;Data Source=Path\\File.mdb;Persist Security Info=True;Password=Password
I got wrong password exception, Even if I am giving the correct password.
[Very-Serious] Pressing Charges - Website -
Hello all, my site MYSPACE was Hacked today and the following damages were done:
Deleted Admin Accounts
Deleted Member Profiles
Deleted Member Groups
Deletion of Legal Files Regarding: Privacy Policy, Terms Of Service
Deletion of Notices
Messages sent to Members
Changing of notice to
Help! DAO Access 97 Password -
Hello. Wish you all a Happy 2005!!!
I am wondering if i could set password to an Access 97 database with DAO in VB during run-time.
Is the password exclusively set in MSOffice Access application?
Can the password be changed (removed and added) via VB codes?
Thanks for th
Attention people who have registered at TT... -
I found these users who have not made any posts and registered before March 1, 2002. I sent out a mass e-mail a while back...if you'd like to keep your account please post at TT, or I'll delete the account (which of course you can recreate at your will):
Code:
Name
Options
password character bug -
I wrote this program a while back and I've been using it daily,
with one password form when app starts
The password character on the textbox is *
but today I opened the sourcecode to do sth and when I run the program, the password characters aren't masked! They're showing up
MS Access Password: Suppress error box -
When someone opens my passworded database, they get the database password prompt.
If the password is wrong or they click cancel, MS Access displays some ugly password denied error message.
Can this be suppressed?
If the password is not correct, I just need MS Access to close
Multi-user delete (Access database) -
I am accessing an Access file over a network. If one user deletes whilst another is editing the same record I get an error. Does anyone know how I can tell if anyone has the record open? Also if a record is deleted and onother user goes forward past the deleted record on an opened rec
Password protect Access database -
I cannot seem to password protect this database file. I have Access 2000 and this attachment is created with access 97.
Without converting it can someone please add password protection to this database with Access 97 so it cannot be opened.
Please use password - 897090
Thanks
Accessing values from deleted datarows. -
Is it possible to access the data values in rows that have been deleted from the datatable? (rowstate = deleted)
How can we set Access DB Password from VB -
I am using ADO. I know how to open an access DB from VB, if DB password is protected manually. I would like to set password to an access database dynamically. Any solution?
Thanks.
Windows User Password - discussion -
Hi everyone,
I just wanted to start a discussion about Windows User Password. No I am not asking how to get a password nor am I inquiring about programs that do this. I already know and have a program that does this. My discussion is why Windows still uses an unsecured method for it
Recover MS Access 2000 password -
Hi,
I need your help. I have a microsoft Access database (v2000), whihc is password protected. How can I recover the password using VB 6. I am not looking for a 3rd party software.
I found serveral examples, but they don't report the correct password...
thank you
ACCESS Database Password -
Hi all
Often we use access database in our software, and for protecting the database we often use the password for the database.
But there is lot of password breakers available in the market and this kind of software break the access database password easily.
But here I want to kn
loss of data -
Hi
I have a very weird problem.I am using a VB6 form that add and update data to an Access 2003 database.If the user deletes a record,the record is not deleted physically but I assign 0 to a Field "DeleteFlag",that way all the data still in the database,the non deleted recor
Access 2000-Password feature -
I have created a password on the Access databe I will use for my VB APP.Now when I try to open the app where it opens the database.It says password is invailid.How do I get the password passed to vb so it will open.
What can be wrong -
Hi,
This is something to do with accessing a secured Access 2000 using VB codes.
I've actually changed my password for my secured database in Microsoft Access. But when I type this password in my VB user interface, it says something like "invalid account or password."
How to link VB6 with MS Access 03 -
Hey!
Recently i'm doing a project that need to deal with database.
can u guys show me the right way to link between VB6 and MS Access?
As i know, MS Access is a place to store data, where else VB6 is an agent to retrieve data from and store data to MS Access. But how to link between
data connection password (access mdb) -
Hey,
I'm a newbie in vb.net with mdb :
1. I've change the password for my access mdb file, but I can not change the password in the data connectiong (it persists on staying the old password).
2. how do I put the mdb password inside the code so it won't be shown on the connecti
Preserving Passwords -
Hey
I need to password protect a certain feature in my application but the problem for me is not encrypting the password (which has now been solved thanx to some of you guys) but where to store it. Sample this - if i were to store it in a seperate file then what if the user deleted
Access 2000 with Password -
I was able to set my Access DB with password and then using DAO to access the DB with no problem.
But it seems like te Access 2000 has more choices in setting the security. Could anybody let me know how should I set the password at Access 2000, then how do I access to the database
Using access with a password.... nid help -
hi pipz,
just a simple question. how do u connect vb to a access db that has a password?
i created a db first without a password and using vb , it works. but wen i activated the security for my db. it gives me an error. could u show me how to connect my vb with access?
Thanks
Deleted Records -
Hi,
I heard that in DBase, until you compact the DB, the deleted records still there. If someone erase a record by mistake, you can go in the DB and remove the "Deleted" flag on the record. Is it possible to do the same with .mdb database with Microsoft Access 2000 ?
Pass a Password to a password protected Access database using OLE -
I need to pass a password to an access database that is password protected.
This database is going to be opened by a vb app, that uses the access application ref. 9.0 libary. What I need to do is open a report in preview mode. All that I have done previously.
This is the code...
Open mdb database with password in vb -
Hi,
I have an access database (.mdb) with a password 'asdf'.
I am trying to access this password protected database from VB with:
Set db = OpenDatabase (App.Path & _
"\database.mdb", , , "PWD=asdf")
I get error message '3031' "Not a valid pass
Opening database with password in VB -
Hi,
I have an access database (.mdb) with a password 'asdf'.
I am trying to access this password protected database from VB with:
Set db = OpenDatabase (App.Path & _
"\database.mdb", , , "PWD=asdf")
I get error message '3031' "Not a va
Data protection outside VB! -
We use Access as our database syatem! We could protect the Access using password. But when we link to VB programs, the Access password becomes a problem to open the database. If we don't use password in Access, one could access the database if this person knows Access and knows that
batch update and accessing deleted record -
it is possible to access deleted records using
rs.Filter = adFilterPendingRecords
but how can it be done in child recordset ( if I use msshape )
Access to a passworded Access database -
I want to protect my Access databases from prying eyes using a password. However, I am worried that a client of ours, or a colleague, may change the password and forget it. When (s)he phones me in a panic, will I be able to get access to the data.
How Secure Is MS Access -
I have written a number of apps in VB6 which use Access database and thanks to this forum I have learnt to password protect these Databases.
My question is :
How secure are these password protected Access databases ie. is it possible that someone could crack the password or access t
[02/03] Using SQL Server Password as Login name and password -
Elow everyone,
Have a nice day! I have a problem here regarding on how do i used my SQL password and username to be my log-in name and password..I've been thinking if how do i used it like for example i have added a username and password on the SQL server on the Security folder
date format in access and of vb Now() function differ -
when i create a new password in my vb system i also insert the date modified into the login table in my access database as i want the password to expire after 30 days so inorder to that i have to compare the date the password was created against present date by using the function Now(
URGENT HELP NEEDED PLEASE !!! Access Password and DAO -
I created a password in MS Access and used the following code to enter with the password. This does not work ! ...can anyone tel me what is wrong ?
dim sDBPass
sDBPass="1234"
Set db = OpenDatabase(dbname, , , "MS Access;pwd=" & sDBPass)
Please He
Creating a Dat File for Userid And Password -
Hi,
I want to create a dat file for storing Userid and password. If i Create a table in access then my application security is not useful because anyone can open access file and see the password. I want to store user id, password and password reminder question and reminder answer in
Password (Save/Change) -
hi all! how can i make a simple program with 2 forms. Firts oe to access my programs options and the second one to change the password for the Form1.
Wen form1 is loaded to appear "Enter your password" after i give the password to enter into the form2. But i need to know how
Using Password Protected Access Database with Datadesigner -
Hi,
I need to use a password protected access database with datadesigner in vb 6.
I do not know anything about workspaces and the software that i am designing will be used on several machines which will not share a single workspace file.
When i try to give a password in the conn
case sensitif password -
Hi
I have a form inside my project that I don't want the users to view it,only the administrator can have access to this form.I'll prompt the user to enter the password, if the password is correct than he can have access.But I want the password to be case sensitive
e.g vbforums is di