ThinkGeo.com    |     Documentation    |     Premium Support

Problem loading .mdb file

I’m having issues loading in a .mdb file in my application, as well as in the sample application provided.

Here’s a screenshot of what I’m seeing in the sample application (as well as mine).

I do have a reference to “MapSuiteFdoExtension” in the project. I also have the folders “MapSuiteFdoExtensionX86” and “MapSuiteFdoExtensionX64” in my SysWOW64 folder and System32 folder.

Any tips?

Thanks!

Hi Dan,

It looks you are running a V9 HowDoISamples, and why you tried to load the MDB file via the sample LoadGeoDatabaseFeatureLayer?

Our V9 had stopped get update, so please directly try our latest V10 sample, you can the HowDoISamples for V10 here: https://github.com/ThinkGeo/HowDoISample-ForWpf

And you can find more samples in the https://github.com/ThinkGeo/

If you still failed to load your data, please show us your test code and your sample data so we can help you look into it.

Regards,

Don

Thanks for the response!

I am using version 10. For now I’d just like to get the sample running in the “HowDoI” project.

private void WpfMap_Loaded(object sender, RoutedEventArgs e)
{
    try
    {
        wpfMap1.MapUnit = GeographyUnit.Meter;
        wpfMap1.CurrentExtent = new RectangleShape(2149408.38465815, 246471.365609125, 2204046.63635703, 213231.081162168);

        PersonalGeoDatabaseFeatureLayer worldLayer = new PersonalGeoDatabaseFeatureLayer(Samples.RootDirectory + @"Data\JORWD6gdb.mdb", null, null, "Mains");
        worldLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.LocalRoad1;
        worldLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

        LayerOverlay worldOverlay = new LayerOverlay();
        worldOverlay.DrawingExceptionMode = DrawingExceptionMode.DrawException;
        worldOverlay.Layers.Add(new BackgroundLayer(new GeoSolidBrush(GeoColor.FromArgb(255, 233, 232, 214))));
        worldOverlay.Layers.Add("WorldLayer", worldLayer);
        wpfMap1.Overlays.Add("WorldOverlay", worldOverlay);

        wpfMap1.Refresh();
    }
    catch (FileNotFoundException ex)
    {
        string message = "You should get Fdo dependencies from [Install-Path]\\Developer Reference\\System32\\, and put MapSuiteFdoExtensionx86 folder to System32 folder.\r\n\r\n" + ex.Message;
        MessageBox.Show(message, "FileNotFound", MessageBoxButton.OK, MessageBoxImage.Error, MessageBoxResult.OK, (MessageBoxOptions)0);
    }
}

Above is the code that came with the sample.

Also, does FdoExtension.dll still exist? I can’t find it anywhere. I found a Fdo.dll, but it threw an error when trying to add it to to the project as a reference.

Hi Dan,

I want to build a sample for you, but it looks I hadn’t found the mdb file for test. If your data size is not big please upload it here and I can see whether it works well with out V10.

There isn’t FdoExtension.dll or Fdo.dll for our V10, that’s only for V9.

You should want to add the reference to this package: https://www.nuget.org/packages/ThinkGeo.MapSuite.Layers.PersonalGeoDatabase/11.0.0-beta006

And you can see its Dependencies, the dll you need is contained in them, when you install PersonalGeoDatabase package they will be installed automatic.

Regards,

Don

Thanks for the response!

I uploaded a zip file with the .mdb attached. I’ll try making a new project and adding the references that you suggested.

mdb file (830.0 KB)

Checked my references and I do have the ones you mentioned, same problem with my .mdb file and the one in the “howdoI” examples.

Hi Dan,

Attached is the sample, 8670.zip (10.2 KB)

please copy your data into AppData folder, then directly run it.

It should works like this:

Regards,

Don

Thanks! Works great now.

Hi Dan,

I am glad to hear that works.

Regards,

Don