You are here

KB#00509-Reserved error (-7778) in Access when connecting to a ODBC data source

Title:

Reserved error (-7778) in Access when connecting to a ODBC data source

Description:

When linking to a data source in Access, the following error may result:

Reserved error (-7778); there is no message for this error.

Resolution:

This error occurs when the File Data Source is selected from Access. If the data source is selected from Access' Machine Data Sources tab, then the error will not occur.

Microsoft Query, on the other hand, does not have this problem. In fact, MSQuery 8 (Shipped with Office 97) requires that the data source be under File DSN; otherwise it does not list it. As MS Word and Excel both use MS Query for ODBC Access, they will require that the Data Source be defined as a File DSN.

Note that it is ok to have the data source defined both as a User DSN and as a File DSN from the Windows ODBC Administrator. If the data source is to be used with Access or MS Query 2.0, then a User or System Data Source must be created. If the data source is to be used with MS Query 8.0 (and therefore Word 97 and Excel 97), a File Data Source must be created.

The easiest way to have both types of DSNs is to first create a User DSN. The next step is to create a File DSN that doesn't contain any configuration information - just a pointer to the User DSN that you just created. Here's how to do this:

1) Find out where the File DSNs are kept. In later versions of the ODBC Administrator, this can be accomplished by clicking on the File DSN tab. It will have a "Look in:" dropdown box that contains the directory where the File DSNs are stored. This is typically "C:\Program Files\Common Files\Odbc\Data Sources".

2) Create a new text file in that directory. This can be done with wordpad or any other ASCII editor. The filename should refer to the name used when setting up the User DSN, for consistancy, and end with a "dsn" extension.

3) Edit the file. The contents of the file should be as follows: [ODBC] DSN=The_Name_Used_In_The_User_DSN

Where the portion following DSN= points to the User DSN that has already been created.