Hexagon Geospatial
MENU

Spatial Modeler

Discuss topics with other Hexagon Geospatial Product pioneers and experts to get the most out of our products.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
New Contributor
Posts: 2
Registered: ‎01-07-2019

Spatial Modeler: SQL DB connection string

Hello,

 

I am using Spatial Model Editor Version 16.5.0.

I am trying to use the Features Database Output operator.

I can create a database connection to SQL server and I get a list of available tables. But when I look at the properties of the operator, the connection string ends after 255 characters.

When I try to run the model, I get an error on the connection string (unexpected end).

 

String in the properties (only 255 chars): 

DB||<dsSmiley Very HappyataSourceMoniker xmlns:ds='http://www.intergraph.com/geoprocessing/ds' version='1.0' type='SQL Server'><ConnectionString ForwardOnly='True'>Server=XXXXXACCL;Database=DataXXXXXXXXX;Integrated Security=True</ConnectionString><Feature></Feature><Fie

 

What it should be:

DB||<dsSmiley Very HappyataSourceMoniker xmlns:ds='http://www.intergraph.com/geoprocessing/ds' version='1.0' type='SQL Server'><ConnectionString ForwardOnly='True'>Server=XXXXXACCL;Database=DataXXXXXXXXX;Integrated Security=True</ConnectionString><Feature></Feature><FieldType>51</FieldType><Filter></Filter><CommandTimeout>120</CommandTimeout></dsSmiley Very HappyataSourceMoniker> 

 

Changing the field by hand does not solve the problem, the maximal lenght of the operator is 255 chars.

Staff
Posts: 115
Registered: ‎06-30-2016

Re: Spatial Modeler: SQL DB connection string

What is the error message you get when running the model?

You can see the error message in the session log (File -> Session -> View Session log)

 

Regards. Sam 

New Contributor
Posts: 2
Registered: ‎01-07-2019

Re: Spatial Modeler: SQL DB connection string

Hi Sam,

 

I get the following messages:

 

22/02/19 12:30:55 SessionMgr(8480): Connection success for the external process 'smeditor'
22/02/19 12:34:49 SessionMgr(8480): Executing spatial model: h:/xxx.gmdx
22/02/19 12:34:54 SessionMgr(8480): Onverwacht bestandseinde aangetroffen bij parseren van Name. Regel 1, positie 241.
22/02/19 12:34:54 SessionMgr(8480): Spatial model execution failed.

 

=> Unexpected file end when parsing Name, Line 1  Position 241.

 

 

The connection string in the field named OutputDatabase (which I try to make complete, but it does not allow me to enter more characters, neither trough properties or the wizard):

Data_xxxxxxx||<dsSmiley Very HappyataSourceMoniker xmlns:ds = 'http://www.intergraph.com/geoprocessing/ds' version ='1.0' type='SQL Server'><ConnectionString ForwardOnly='True'>Data Source=xxxxxxxxx;Initial Catalog=Data_Staging;Integrated Security=True</ConnectionStrin

 

regards,

Annelies

Staff
Posts: 115
Registered: ‎06-30-2016

Re: Spatial Modeler: SQL DB connection string

Hi Annelies

 

The field displays only 256 characters, but that is only for display. My suspision is that the connection to th SQL server was not properly made.

 

You can diagnose this by trying to display the vector data in the viewer.

 

In the viewer, open the vector data (select SQL Server Features Proxy from teh file type drop down list). When yo do that you will have the connect button. Use that to enter the database credentials, select the feature you want to display from the features table.

 

See if the features displays properly or you get the same erro message as you do when running the model.

 

Regards, Sam

 

Polls
Please register to vote
Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.