ThinkGeo.com    |     Documentation    |     Premium Support

Error message : DataReader.GetFieldType (13) returned null

Hi Steph,

We still hadn’t reproduced it, we test it in the new environment and it looks View works the same like Table.

So could you please upload a really simple sample which can reproduce it? Maybe you can try to don’t use map, only use the SqlClient class to try to reproduce it.

Regards,

Ethan

Hi Ethan,

I have prepared a small project with a database that presents the problem on some of our client computers.
Below, the description of the differents elements are :

  1. ThinkgeoProblemView is the database to restore. This is the view (dbo.vw_AnalyseCarto) that raises concern. The dbo.cartographie table works well.
  2. 0190218_TicketViewAnalyseTerre.zip is the project that reproduces the problem
    a) The ListeCouchesACharger.xml file in the project lists the layers to display in the map. In order for the project to work, you just need to specify the name of your sql instance in this file.
    This is the view (dbo.vw_AnalyseCarto) that is currently enabled in the file ListeCouchesACharger.xml. You can comment on this view and enable the dbo.cartographie table if you wish.
    b) cf. Screen shot (ListeCouchesACharger_ActiveVIew.JPG ; ListeCouchesACharger_ActiveTable.JPG)
    c) The screen shot Screenshot.jpg is what you should see if project start well
  3. file.txt generated is the log file in the repository debug
  4. I added some files for you to see the environment of our test machines (system_OK.txt; system_PASOK.txt; PC_PASOK.jpg; PC_OK.JPG)
    If the file is suffixed PASOK, it means that the project does not work on these machines
    If the file is suffixed OK, it means that the project works on these machines

Note that by continuing to look at the problem, one of the common points of machines that do not work is the version of SQL 12.0.5000.0, but I do not know if the problem can come from there

Thanks for your help.

Regards.

Steph.2019103_Thinkgeo.zip (2.9 MB)

Hi Steph,

Thanks for your information, we will try to reproduce it first.

Any question or update I will let you know.

Regards,

Ethan

Hi Steph,

Our developer build a new test environment for it, but it looks we had been blocked when try to restore your backup file.

You can see, when we choose the bak file, the inner database cannot be parse correct, and we cannot go to next step.

The MSSQL Server Management Studio is 2014, and the database engine is SQL Server 10.50.4042.

Could you please check the bak file and update it? Or if we go incorrect way to restore it please let us know.

Regards,

Ethan

Hi Ethan,

The problem comes from the difference of version between our 2 DBMS (you are in 2008 R2, I am in 2014).
I made an alter database so that it can be compatible with 2008 R2 in this new Backup.
Normally you should be able to restore it.
Thanks

Regards.

ThinkgeoProblemViewCompatible.zip (591.0 KB)

Hi Steph,

Thanks for your update, but it looks the error still there.

In fact I install the SQLServer in another machine today and restore also don’t works, I am not so familiar with database so I hadn’t found where is the problem. If the restore backup don’t works, do you think it’s possible to export the script to build tables, and another script to import some data in it? And if it don’t need so many items to reproduce the problem, you can just export part of the data for example 100 items in your script.

Regards,

Ethan

Hi Ethan,
The version of your Sql server is still database engine is SQL Server 10.50.4042. ?
If so, can you pick a version more recent as 12.0.5000 for example.
you can choose a Sql server express, it’s free. (https://www.microsoft.com/en-us/download/details.aspx?id=53167)

regards.

Steph

Hi Steph,

Thanks for your suggestion, I will try to upgrade the version and try it again.

Regards,

Ethan

Hi Steph,

Because it will be weekend now, I want to update the status today.

The good news is it looks restore works after upgrade version. But upgrade SqlServer also introduce some strange problems in our test environment, the tables cannot be opened now. Uninstall old versions don’t solve it. (I think MS should update their uninstall utility, the latest version I found do some change, even repair cannot make it works).

But please don’t worry about it. I will recreated an environment with SqlServer 2014 first and try to reproduce your problem after that.

Regards,

Ethan

Hi Steph,

Sorry for the late reply.

Uninstall old version of SQL Server make the environment met strange problems, I still cannot solve it and because we cannot reinstall OS now. So we bought a cloud machine in AWS for this problem, then we restore the backup and try to reproduce your problem there.

But it looks the application run well:

It looks the two buttons “Extend” and “Zoom to jp2 raster leak memory” don’t have related events, do you thinks it’s missed in the project? If you have a step to reproduce it that should be helpful.

Regards,

Ethan

Hi Ethan,

Thanks for your response.
The problem comes as soon as the project is opened.
The 2 buttons are a relic of an old test project (I could have deleted them).
It’s weird that you have not managed to reproduce the problem.
You have installed version 12.0.5000 of sql?
What kind of Collate Sql do you have for your Sql Server?
in our projects, we use Latin1_General_CI_AS. Is it the same for you? (Maybe the difference in behavior can come from there?)

You can see all Collate Sql listed by SQL with this query :

SELECT name, description
FROM fn_helpcollations()

The name of the collate that we use is Latin1_General_CI_AS

SELECT name, description
FROM fn_helpcollations()
where name like ‘Latin1_General_CI_AS’

Thanks
Regards.

Steph.

Hi Steph,

Does 12.0.5000 is necessary? It looks the AWS installed version is the latest version, it’s number is 14.0.1000.

If 12.0.5000 is necessary I will try to reinstall it.

And the “Server Collation” of database instance is “SQL_Latin1_General_CP1_CI_AS”:

But it’s “Latin1_General_CI_AS” for target database “ProblemView”:

Do you think it have problem here?

Regards,

Ethan

Hi Ethan,

Thanks for your response.

PCs that have this problem have this common point of having version 12.0.5000, so this can be a track.
For the Sql server collation, I specified the one that we install on our posts so that you have as much information as possible, and thus have the same working environments.
It is possible de change the server collation after insatllation if you want (https://www.mssqltips.com/sqlservertip/3519/changing-sql-server-collation-after-installation/)

But I think the problem is the version of sql server 12.0.5000.

Thanks.

Regards.

Steph.

Hi Steph.

Today I uninstall the 2017, then reinstall 2014 and upgrade it to sp2 (that’s 12.0.5000). And when I reinstall the 2014, I choose the collation and set it equal Latin1_General_CI_AS.

But it looks the test result is still OK without exception.

Do you think it still have anything we missed about the environment? If you hadn’t found anything, I think I can sent you a test connection string, and you can see whether your code can reproduce it with my database(If it can reproduce that with your database).

Regards,

Ethan

Hi Ethan,

Thanks for your test.

I just want to do a last test on our side, but I have to activate this new application on a PC’s client (currently, I have a license no activate that appears)

Is it possible to activate as many applications as we want with our WPF thinkgeo license? (Currently, we have only one app activated with Thinkgeo.) ? (https://wiki.thinkgeo.com/wiki/map_suite_runtime_license_guide_for_desktop)

Thanks.

Regards.

Steph.

Hi Steph,

If you are directly run your application there, you can build the run time license just follow the guide in our wiki, then put the license file in the same folder of your execute file. Then it can works in your new machine.

If you want to debug it there, please upgrade all your packages into the latest version, then deactivate your license from your currently machine and then login the same account and activate it in the new machine.

Any question please let us know.

Regards,

Ethan

Hi Ethan,

Thanks for your help.
And just about Runtime license, I know that once the map is activated for an application, it is possible to deploy the application on as many PCs as we want.
So we currently have only one application enabled with license runtime.

But is it possible to activate several applications with license runtime, for example a ApplicationA.exe ; ApplicationB.exe etc … which use the thinkgeo map and deploy it on many PCs ?
Formulated differently, a license Thinkgeo Wpf can create as many applications with a map that we want and deploy these applications on the same PC?

Thanks.

Regards

Steph.

Hi Steph,

It should works. The file license only related with its corresponding execute file, and different license file won’t effect each other even they are in the same machine and is built by the same account.

Please make sure upgrade your packages to the latest version.

If you met problem about it, please let us know.

Regards,

Ethan

Hi Ethan,

I have 2 more questions :

  1. When you say “It should works” , that means it’s not sure ?
  2. Why do you ask “Please make sure upgrade your packages to the latest version” ? Currently, we are using version 10.4.5. Is it OK to generate the runtime licence ?

Thanks.
Regards.

Steph.

Hi Steph,

  1. I hadn’t tested it last week so I cannot say it’s sure, but follow the design and our experience it should works.
  2. Because between our 10.1 and later versions it have a big change about license, so I mentioned please upgrade to latest version. The 10.4.5 is OK.

Regards,

Ethan