Runtime Error 3031. Not a valid password

I am using VB6, DAO connection to connect to Access ACCDB file. The ACCDB file is created with password. But program hit error whenever attempt to open a db connection. The message as below. I have tested the password by directly opening the ACCDB file
in Microsoft Access. Password is correct.
The error message is runtime error 3031. Not a valid password
The code use as below
Sub OpenDB()
 Dim db As DAO.Database
 Dim ws As DAO.Workspace
 Dim rst As DAO.Recordset
 Set ws = DBEngine.Workspaces(0)
 Set db = ws.OpenDatabase("mydata.accdb", False, False, ";PWD=test12345")
 Set rst = db.OpenRecordset("house", dbOpenDynaset)
 If rst.RecordCount > 0 Then
   rst.MoveLast
   MsgBox rst!address
 End If
 rst.Close
 db.Close
End Sub

Hi Jsl,
Your code works well on my side, I can open a database with password. Below is the sample which I have tested:
Option Compare Database
Sub OpenDB()
 Dim db As DAO.Database
 Dim ws As DAO.Workspace
 Dim rst As DAO.Recordset
 Set ws = DBEngine.Workspaces(0)
 Set db = ws.OpenDatabase("D:\Access Files\StudentDbWithPWD.accdb", False, False, ";PWD=123")
 Set rst = db.OpenRecordset("ClassInfo", dbOpenDynaset)
 If rst.RecordCount > 0 Then
   rst.MoveLast
   MsgBox rst!ClassName
 End If
 rst.Close
 db.Close
End Sub
So, it is strange that it does not work for you. Can you send me a copy of your Access file to my hotmail account:
[email protected]
I will try to reproduce it on my side.
Best Regards,
Bruce Song [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

Similar Messages

  • Error of "Not a Valid Win 32 application " installing 7.0 for iPod Shuffle

    I have downloaded the apple Itunes 7 software and I get an error of : Not a Valid Win 32 application I have windows xp I have been trying to figure this out for a couple of hours.
    All I can figure out is that it is because I have dial up and not a broadband connection (which is one of the requirements for 7.0). If this is the problem, what do I do to get around the not having broadband?
    Any help would be greatly appreciated!!!! I would love my new present to work! PS. a family member already has an Ipod Nano installed, can we use the same iTunes?

    I have downloaded the apple Itunes 7 software and I
    get an error of : Not a Valid Win 32 application I
    have windows xp I have been trying to figure this out
    for a couple of hours.
    All I can figure out is that it is because I have
    dial up and not a broadband connection (which is one
    of the requirements for 7.0). If this is the
    problem, what do I do to get around the not having
    broadband?
    Any help would be greatly appreciated!!!! I would
    love my new present to work! PS. a family member
    already has an Ipod Nano installed, can we use the
    same iTunes?
    I found that I had a bad (not complete) download. After redownloading 7.0 and installing it, it worked great. Hope this helps other with my same problem.

  • Error - 2048 not a valid movie file

    hello,
    I'm a NAPP member and had been following the photoshop TV casts on QT....however, now I get the error message 'error - 2048 not a valid movie file'...its an mpeg4 QT file, but I get the message whenever I attempt to play the downloaded file...or when I try to just watch the stream, it won't open the URL...these are the only movies that I'm having this problem with...as I can watch other movies from other sites w/o incident...NAPP hasn't replied to my inquiries except that they don't support the TV shows.
    Any ideas?...would be appreciated...
    Thanks...
    G5 - dual 1.8 ghz - 2ghz ram   Mac OS X (10.3.7)   Dell Inspiron Core Duo notebook w/ XP home

    T S
    Thank you very much for the link to videolan.org. I was having the same problem playing downloaded Photoshop TV videos. I tried MPlayer which worked but was not comprehensible. I had never heard of videolan, but it works like a charm.
    Thanks again.
    17 PowerBook, 1.33 Ghz   Mac OS X (10.4.6)   2 GB Ram, iWeb 1.1.1

  • Version 31.3, error in upadting RSS feeds. Error Message - not a valid feed.

    After upgrading to version 31.3, error in updating RSS feeds.
    Error message - not a valid feed.
    Unable to Attach screen shot of feed validator results

    The answer is in the guide, please read it carefully:
    https://support.mozilla.org/en-US/kb/how-subscribe-news-feeds-and-blogs
    You can turn on extreme debugging as well. The problem is always with the publisher failing to follow specs; inform them to do so.

  • QAAWS error message "not a valid query"

    Hi,
    When I'm trying to connect to QAAWS I get this error message: "not a valid query. FWB 00025".
    Does anyone know how to solve this problem?
    The server where the BOE is installed on has been restarted a couple of times but it doesn't help.
    Universe Designer and WebI work fine.
    Thanks!

    Is QaaWs running properly on your system?
    To validate the installation, open a browser and type the following URL
    http://[server]:[port]/dswsbobje, where [server] corresponds to
    your web server address and [port] corresponds to the port where you
    set up in your web server. The default used by Tomcat is 8080. dswsbobje
    is the default name of the Web Service provider web application. Then Validate.

  • I changed the password to one of my gmail accounts. My MacBook Air accepts the new password and shows me email, my iPhone 5s tells me it's not a valid password. In settings, I change the password and pw is accepted. How can I get 5s to accept new pw?

    I changed the password to one of my gmail accounts. My MacBook Air accepts the new password and shows me email, my iPhone 5s tells me it's not a valid password and does not show me email. In settings, I change the password and pw is accepted. How can I get 5s to accept new pw?

    CORRECTION! GMAIL accepts new pw and shows me email. Mail on MacBook Air and iPhone 5s do not accept new gmail pw. What can I do to get my apple products to accept my new gmail pw?

  • Pages is not saving document correctly.  After saving the changes either do not appear or you can not open the file. The error is "not a valid format"  I am in Pages '09 4.1 (923).  I also use Parallels.  Anyone having similar issues?

    Pages is not saving document correctly.  After saving the changes either do not appear or you can not open the file. The error is "not a valid format"  I am in Pages '09 4.1 (923).  I also use Parallels.  Anyone having similar issues?

    I'm not sure that Lion AutoSave feature apply to network servers.
    I'm just sure that the Versions feature doesn't.
    Yvan KOENIG (VALLAURIS, France) samedi 21 janvier 2012
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My Box account  is : http://www.box.com/s/00qnssoyeq2xvc22ra4k
    My iDisk is : http://public.me.com/koenigyvan

  • Visual C++ Runtime Error R6016 not enough space for thread data

    I get these errors on startup of my Windows 8.1 (with all latest updates installed) after login.
    1. It would be helpful if the error message actually identified the exe or dll causing the problem.
    Program: C:\Progra...
    Is not a very helpful clue to the source of the error and because of its brevity comes across as being contemptuous of the user.
    Image > https://plus.google.com/photos/116576618429528389782/albums/6004901461676803857
    2. From the active apps Desktop toolbar it appears that this problem may be associated with
    Apple IE DAV
    3. I suspect that the problem announced by this error might also be contributing to the the fact that my Chrome browser now appears to be overlaid with a pink matt variation on its entire colour scheme. I have reported the pink matt error directly to Google
    Chrome support.
    Thanks
    Martin

    Hi,
    Have you noticed any event in local event viewer related to this error?
    Error reference:
    C Run-Time Error R6016
    http://social.technet.microsoft.com/Forums/en-US/13aa9b30-e00a-4ddc-9763-93702084bbea/visual-c-runtime-error-r6016-not-enough-space-for-thread-data?fo
    Also, I suggest you to test the issue in clean boot mode to narrow down the issue.
    How to perform a clean boot
    http://support.microsoft.com/kb/929135
    If the issue doesn’t appear in clean boot mod, you can determine which one can be the cause by using dichotomy in MSconfig. Checking on half of Non-Microsoft service and restart, determining which half of the services cause the issue and repeating to check
    half of the problematic half services.
    Otherwise, please test the issue in Safe mode and let me know the results, then provide the screenshot of the error.
    Kate Li
    TechNet Community Support

  • Runtime Error still not fixed in Reader 9

    Just downloaded and installed Reader 9 on my Win 2003 server machine.
    As soon as I start it up, I get the dreaded C++ Runtime Error:
    "This application has requested the Runtime to terminate it in an unusual way."
    Then, boom: Reader closes down. Furthermore, I can't double-click on a PDF file name, and I can't open a PDF in a browser. In both cases, I get the same error.
    Re-naming updater.api didn't fix the problem. Re-installing Reader didn't change anything, either.
    In doing my research, I see that this defect has plagued Reader users for several previous releases; i.e., for years now. That in itself is just incredible.
    What's worse: The defective installation of Release 9 just wiped out a perfectly functioning Reader 8.
    So... Does anyone know how to fix this annoying snag?
    Steve Kobb
    P.S.: Not interested in becoming a Foxit user.

    One of the few issues with Acrobat 9 that is peeking above the radar is the C++ error when launching Acrobat 9. There are two things that seem to be resolving the issue. One is to uninstall, delete all Acrobat leftovers, and then reinstall. However the solution that seems to be fixing more cases is a new admin user. According to Scott Worthington several of his cases were caused by users not having the correct permissions. That is they were domain admins instead of local admins. The best way to create a new admin user in these cases is to use the "back door" approach of creating the new user thru Administrative Tools/Computer Management. In the Computer Management window right-click on Users under Local Users and Groups and from the context menu choose New User. Fill out the fields at the top of the window and then uncheck User must change password at next logon. After the new user is created right click on the new user name and choose Properties from the context menu. Go to the Member Of tab and click New then add Administrators to the list. Use the "Check Names" button to make sure the group name is correct.If it is correct it will become underlined. It needs to be capitalized and must have an "s" on the end. Click Apply and then OK.

  • Error message 'not a valid PDF document'

    Hi folks,
    my Z10 has trouble opening some PDF documents sent as email attachment. When I try to open them the error message appears:
    Important message
    The document cannot be opened because it is not a valid PDF document
    There is no BES10 Service involved in my environment. Mails are synced with with active sync.
    OS Version: 10.2.0.429
    Any suggestion appreciated.
    Best regards,
    RAUMPATROUILLE

    Stuffit is the only app I know of which can decompress its own format. Your Windows clients must use the free Expander to open them. Otherwise, use OS X's built in zip compression and they'll be able to open the files without the need of third party software. Right click on any item, or group of items and choose, "Compress xxx Items" (how it will read if more than one item is chosen).

  • Error - '' is not a valid boolean value

    I have been receiving the error message = '' is not a valid Boolean value quite frequently.  It doesn’t matter which hierarchy I am in but it’s typically when I do an Add or Insert.  When selecting ‘ok’ on the error message, I’m able to continue on with my work but was just curious what causes this error.  Sometimes when this error shows up and I click ‘ok’, it will take me out of the DRM screen and into whatever else I may have open at the moment.  Any thoughts or ideas?  We are on version 11.1.1.2.103

    As Murali stated-
    It could be a property incorrectly configured, check all the boolean type properties and see if any of them are getting a string value by any chance.
    Thanks
    Denzz

  • Loading versions 4.3 & 4.2SP2, error message: "not a valid Win32 app"

    Hello, I've been trying to install two versions of BDS, and both download fine, but upon clicking on the icon to install, I get the error message: "(name of app) is not a valid Win32 application".....does anyone know what the heck this means and how to fix it? Thanks much, Aaron Worley

    Hi, I'm having the same problem. Has anyone got an answer.
    I suspect it could be something to do with x64?
    Help? 

  • Portal Runtime Error - iView not found

    Hi friends,
    I am working in SAP Enterprise Portal (EP6 SP9).
    I have made a URL iView pointing to an HTML file (residing on Portal server).I have attached this iView in the "Related Links" section of a page.
    Problem:
    When I access this iView by clicking it, it opens perfectly well.But if i keep the same page untouched for about 15-20 min, and then try to access the same iView, it shows me the following error.
    Portal Runtime Error
    An exception occurred while processing a request for :
    iView : N/A
    Component Name : N/A
    iView not found: pcd:portal_content/com.freescale.SUPO_Roles/com.freescale.sup_rol_epp/com.freescale.sup_wks_0007/com.freescale.sup_pge_0012/"relatedItems/RelatedLinks/com.freescale.url_ivu_0004".
    Exception id: 09:45_15/09/05_0012_7337651
    See the details for the exception ID in the log file
    Does anybody have a possible solution to this problem?
    By any chance does this problem has anything to do with the iView being in the "Related Links" section of the page?
    Thanks and Regards,
    Jitendra Chaudhari
    India

    Hi
    I have the same problem. do you have a solution for this?
    Regards,
    Miri

  • HT1926 I just downloaded the most current ver of iTunes and it did not make it. Now I get a runtime error.  Not sure what to do.

    I tried to download and install the latest versionn of iTunes and it didn't update. Now, each time I try to go into the program it says "Runtime error an application attempted to load the c runtime lobrary incorrectly.  Is there a way to fix this, or do I need to completely lose all of my music by re-loading a new version.  I need to get it back someway without losing everything.  HELP!

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later).    This was posted earlier by TuringTest2.
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes

  • Runtime errors are not showing in debugger!

    Hi,
    I have recently faced a very strange problem. at first I thought maybe it's because of the new Air SDK 15 build 302 but after switching back to older SDK the problem is still there! any idea or hint about this would be great. just tell me the first thing that comes to your mind and I will search about it more...
    the problem is that when I was testing my apps in debug mode (on Android or iOS) if there were a runtime error, the app used to stop and my IDE (I use FlashDevelop) could take me to the exact line were the error had occurred... and I could fix the bug. I've been doing this for many years of course! (I'm NOT a newbie)
    but in the past week, the debugger is not throwing errors any more! in some cases it does but on other runtime errors, it does not!
    this is not happening on my computer only, it is happening on another computer we have here too! that is so weird and annoying! not being able to see error messages is silly.
    My guess:
    I don't know if this can be related or not, but the project we're working on is huge and there are a lot of .as classes to be compiled, maybe the debugger is giving up on this project because of it's size? maybe I should switch some of the classes into swc?

    Sounds like the project somehow does not use the flash debug player but the standard flash player; I'm not familar with FlashDevelop but you should check if you are really using a debug player. You can do this programatically, too: flash.system.Capabilities.isDebugger

Maybe you are looking for