[MIcrosoft] RRS feed

  • Question

  • There is this access database we have which was made using Access 2000. It works fine with a computer running XP and Access 2003. My machine is running XP SP2 with Office 2007 (Windows 7, Vista give the exact same error as well). Each time I try to open this .mdb file I get the following error:


    I have tried to change the collating sequence of the Access dBase driver under Administrative Tools from "ASCII" to "International." However the error persists. I have posted the code of the module below highlighting the line where the error stems from.

    If I can provide any other information that might be help, please let me know!

    FYI, I did not write the following code and consider myself an amateur troubleshooter as far as VBA goes.



    Any help will be much appreciated!! Thanks in advance!


    • Edited by mayanksuri Thursday, April 7, 2011 9:23 PM
    Friday, March 11, 2011 8:42 PM

All replies

  • Hello mayanksuri,


    Welcome to the MSDN Forum and thanks for posting here.

    According to your description, I think this issue is about the Access DataBase and the OS. As I know, if you create a Access DataBase in one language environment, and use it in another language encironment, that issue occurs. So I suggest you to post it in the Access Forum.

    Here it is:

    To solve this issue, I think we could try the following operations:

        1. Open Microsoft Access, and open a file, click "Tools", and select "Options", then"General".  Notice that in the bottom right of the "New Database sort order", select "General" . Then turn off the file. (Notice that the "Options" has the file open only in the state that could be used)

        2. then "File" -> "New ..." to create a blank data file, and then "File" -> "Get External Data" - "Import" to open the old database file and let all the tables in new document and then save the new file.

    3. Save this new document, then upload to the server.
    4. solve the problem!

     I hope this can help you.


    Have a ncie day,


    Jackie Sun [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.

    Monday, March 14, 2011 6:33 AM
  • Can't remember what the default Recordset CursorLocation value is but for use with an Index it needs to be adUseServer. Plus the Open statement needs to look like below:

    Pipes.Open "Select CODE from PItem order by CODE", Conn, adOpenKeyset, _
            adLockReadOnly, adCmdTableDirect 

    You should also check to see if Index and Seek are supported prior to setting the Index property and after the Recordset has been opened:

    If Pipes.Supports(adIndex) And Pipes.Supports(adSeek) Then

    If you aren't using Seek then there is no need to set an Index and you should just remove that line of code and try running the app again.

    FYI, there is also an MSDN Access for Developers forum:

    Paul ~~~~ Microsoft MVP (Visual Basic)
    Monday, March 14, 2011 7:03 PM
  • Thanks for the information Paul. However, your reply does not address my question all all.


    Have a good day!


    Thursday, March 31, 2011 4:58 PM
  • Did you try commenting (or removing) the Pipes.Index statement? It is invalid unless used with the adCmdTableDirect CommandType.

    Also, you may want to consider using Jet/ACE OLEDB and the dBase ISAM instead of the ODBC driver.


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Thursday, March 31, 2011 6:15 PM
  • Thanks Jackie!

    That sort of solved the issue.


    When you already have Access open and the settings as mentioned by you, then if you open the file from within Access, the file loads without any issues. However, if you open the mdb file itself it gives the same error.


    Good day!

    Thursday, March 31, 2011 6:27 PM