PDA

View Full Version : Datasourcemoniker issue with Access .mde file



cocoflipper
03-17-2008, 05:30 PM
I have an Access process that imports a datasource from the current database I am using, eventually for use in MapPoint. Here's the code in question:

zDataSourceZ = Application.CurrentProject.FullName & "!qry_ZipData"
Set objDataSet1 = objDataSets.ImportData(zDataSourceZ, ,
geoCountryUnitedStates_Const, , geoImportAccessQuery)

This works if the database I am using is an .mdb However, if I make the
database an .mde (by converting it to executible code), I get the following error when at the Set object line of code:

Error number - 4007
Error Description - Cannot connect with the specified DataSourceMoniker.

The only thing that changes is the file extension on the current database--->
.mdb to .mde

Why? Does the ImportData method not work with .mde files? If not, what will work with .mde files?

Thanks,

Wilfried
03-18-2008, 09:20 AM
Hi,

I recall 4007 is 'unrecognised database format'. So you may be right about the unreadable format.