03-25-2019 08:18 PM - edited 03-26-2019 12:03 PM
I am trying to connect my database to Spatial model but I'm not sure if I am doing the right thing.
I have the following workflow:
I have two input ports that should be a database feature. For that, when I run the model it will prompt two inputs:
On file dialog I will pick Connect.. and I set my database connection.
but after that Spatial modeler raises an error "Object reference not set to an instance of an object."
I wonder if I missing something here.. What is the right way to import a feature from database?
03-26-2019 11:02 AM
Your credentials may be incorrect. Have you tried displaying the features in the database in the IMAGINE viewer? That is a good test to verify that you have the correct connection credntials.
In the Viewer, right click and select "Open Vector layer..."
Once the dialog comes up, select SQL Server Features Proxy, connect to the database and display it.
03-26-2019 12:02 PM
thank you for your suggestion.
I don't have the IMAGINE viewer but I actually can display the features and actually run the model on Geomedia Desktop. So, the credentials are ok.
I want to be able to run my model on Spatial Modeler 2018 but unfortunately when I use 'SQL Server Features Proxy' the connection doesn't seem to work.
03-26-2019 04:09 PM
Thank you for your answer.
I believe I installed the "appropriate 'Microsoft SQL Server System CLR Types' software for the SQL Server database version that is being used" but the issue persists.
Although, I believe the issue regarding to the following message: "Object reference not set to an instance of an object." it could be simpler. think I only need to know how to create a SQL Server Feature proxy file in first place.
I wonder how to generate a SQL Server Features Proxy file?
Does this make sense?
03-26-2019 05:47 PM
>> how to generate a SQL Server Features Proxy file
In Spatial Model Editor with model open
03-26-2019 06:42 PM
but when I get to the stage of selecting the connection by clicking on the first cell on left as you indicate on picture I will get an error.
As you can see on my example below:
After I select the connection I will get the following error:
04-11-2019 05:09 PM
I have tried on another machine but unfortunately, it didn't work as well.
This doesn't work. It's a bit annoying as I only can run my spatial modeller on geomedia desktop and I'm not able to debug my work process on Spatial modeller.
04-11-2019 05:16 PM
I replicated the issue using the dataset you previously provided and logged a support ticket.
We were unable to find out what there was about the SQL Server database that leads to the problem, the ticket will be reviewed in due course.
I have not tried, but only other suggestion is to export to a fresh database. Whether that helped would depend on whether it is GeoMedia metadata content causing problems or data content causing problems.