Hexagon Geospatial
MENU

GeoMedia Smart Client

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Super Contributor
Posts: 301
Registered: ‎02-10-2016
Accepted Solution

GMSC 2015 show error about opening DataReader

Hi team,

 

Our client GMSC suddenly shows error about DataReader object when she uses the query. The query gets executed but she can't fit the selected instance in the data window on the map. The full error message is "System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.". This message is quite confusing, I already done a couple of searches, but still have no idea what goes wrong with the system.

 

Appreciate all ideas or suggestions on this problem!

 

Kind regards

Staff
Posts: 966
Registered: ‎10-19-2015

Re: GMSC 2015 show error about opening DataReader

Hi,

 

do you select the primary key in the predefined query definition? Can you please check the smartclientservice.log on the server side?

 

Thanks,

Stefano

Stefano Turcato
Presale Engineer
Hexagon Geospatial
Moderator
Posts: 243
Registered: ‎02-08-2016

Re: GMSC 2015 show error about opening DataReader

Hello Bob.

 

More details would help, did this just start happening after a change or is this new? Workflow? code?

 

 

Super Contributor
Posts: 301
Registered: ‎02-10-2016

Re: GMSC 2015 show error about opening DataReader

Hi all, 

 

Thank you for taking your time looking at this issue. I already check the predefined query and it does include the primary key: 

 

select * from wdc_bd_parcel_v
where OWNERS like REPLACE('%'+{ENTITY.Owners}+'%',' ','%')

 

 

 We recently have an offline workflow being added to the project. Here is the full exception message in the SmartClientService.log

 

11.08.2016 16:57:12 ERROR - Unexpected exception: There is already an open DataReader associated with this Command which must be closed first.
System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first.
   at System.Data.SqlClient.SqlInternalConnectionTds.ValidateConnectionForExecute(SqlCommand command)
   at System.Data.SqlClient.SqlCommand.ValidateCommand(String method, Boolean async)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at Intergraph.Emea.Data.SqlServerProvider.GetSpatialMetadata(String tableName, String columnName, DbConnection connection, DbTransaction transaction)
   at Intergraph.Emea.SmartClient.Services.Dal.FeatureAdapter.GetGeometriesByIds(Object[] ids)
   at Intergraph.Emea.SmartClient.Services.SearchService.BeginGeoCodeRange(GeocodeRequest request, AsyncCallback callback, Object asyncState)
   at AsyncInvokeBeginBeginGeoCodeRange(Object , Object[] , AsyncCallback , Object )
   at System.ServiceModel.Dispatcher.AsyncMethodInvoker.InvokeBegin(Object instance, Object[] inputs, AsyncCallback callback, Object state)
   at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
   at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

Once it happens, I also receive a SOAP exception on the GMSC client side about this problem

 

 

I include a full SmartClientLog. 

http://filetransfer.intergraph.com/workflow/GET/EWZT8OGBLI9M97RR

 

 

Kind regards

 

Super Contributor
Posts: 301
Registered: ‎02-10-2016

Re: GMSC 2015 show error about opening DataReader

Hi all,

 

I double-check again the client's view, the values of the primary key column somehow get duplicated and I believe it the cause of the problem. Thank you for all the hints and suggestions. 

Highlighted
Super Contributor
Posts: 353
Registered: ‎10-12-2015

Re: GMSC 2015 show error about opening DataReader

Turns out client was still having the problem.

Ended up having to update the RPI_FEATURE.DATACONNECT and RPI_FEATURE.DATACONNECT fields to include ;MultipleActiveResultSets=true at the end of the connection string.

After that it started working - so far.

Had similar issue at another client a few years ago - changed all their connection strings to also use ;MultipleActiveResultSets=true and they worked fine as well.

Would love to know why this client suddenly hit the problem and why have to add ;MultipleActiveResultSets=true to workaround it - and if adding ;MultipleActiveResultSets=true is going to introduce another problem, such as performance etc.

Still testing - need to update all other connection strings and let client loose on it for a while.

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