18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Database Interface<br />

To solve this problem, make sure you are using MySQL Connector/Net v6.2.0 and that the table you are<br />

accessing exists in the database.<br />

Q: Why is the Database Interface automatically closing some connections<br />

A: By default, the Database Interface can have a maximum of 1000 connections. When this maximum is<br />

exceeded, the oldest connection is automatically closed to allow the new connection and the Output window<br />

displays an extended message describing which connection was closed and what was the last command<br />

executed.<br />

To increase the maximum number of database connections, open the project file (project_name.app) in a<br />

text editor and change the following setting:<br />

[StDB]<br />

MaxConnections=number_of_connections<br />

Keep in mind that increasing the maximum number of connections may decrease project performance.<br />

Q: I configured my Connection String using the browser and the Data Link Properties Window. When I click<br />

the Test button, it says "Test succeeded". However, when I run my project, the Database Interface displays<br />

error messages, and I am not able to save data.<br />

A: The Data Link Properties Window uses OLE DB to interface with the Database. IWS Database Interface<br />

uses ADO.NET; therefore, you can have the OLE DB provider on your machine and be missing the ADO.NET<br />

provider. It is also possible that you are using an ADO.NET provider that is not listed in the StADOSvr.ini<br />

file. Please refer to Studio Database Gateway for more information about adding ADO.NET providers to the<br />

StADOSvr.ini file.<br />

Q: Why, when I update information in one line in the Grid object, is it updating more than one line in my<br />

database<br />

A: The grid object issues an update command in the database using the values in all the columns for the<br />

specific row that you are trying to update. If you have rows with duplicate values, you might see this problem.<br />

If your table has a primary key or any other unique field that you do not want to display in the Grid object,<br />

you can add it to the Columns but specify the Width 0. This will fix the problem.<br />

Q: Why do I have to use a separate Column to store the milliseconds on my database<br />

A: Some databases do not support milliseconds in the Time Stamp field. IWS Database interface, by default,<br />

requires another column for the milliseconds. If your database can handle milliseconds, or if you do not want<br />

to record the milliseconds, you can change the default behavior in the Advanced settings. Note that some<br />

databases are able to store milliseconds, but they have lower precision. If you mix different databases with<br />

different precisions in redundant mode, you can get synchronization problems.<br />

Q: My project works fine when I run in emulation mode. But when I send to the Windows Embedded device, it<br />

cannot communicate with my database.<br />

A: It might be the case that your Windows Embedded device does not have the .Net Framework or that it does<br />

not have the provider that you are using. Try to use the gateway remotely by following the instructions in<br />

Linking the Database Through a Remote DB Provider.<br />

Q: When I try to connect to the database, why do I receive the message, Error to create connection<br />

class<br />

A: The .Net Provider that you are trying to use is not installed on your machine. This error message is usually<br />

followed by the provider name; if you are using the Sybase database, for instance, the message is followed<br />

by [iAnywhere.Data.AsaClient.AsaConnection]. The Provider is the iAnywhere.Data.AsaClient. You can<br />

check if the provider is installed on your machine by going to the Control Panel > Administrative Tools > Microsoft .Net<br />

Framework x.x Configuration. The provider should be listed in the Assembly Cache.<br />

Q: What if I have the provider assembly (usually a .dll file) but it is not listed in the AssemblyCache<br />

A: If your assembly has a strong name, you can register it in the Assembly Cache using the gcautil<br />

program. Or it should work if you copy your assembly to the same folder as the StADOSvr.exe (usually the<br />

[…]\<strong>InduSoft</strong> Web Studio v7.1\Bin folder).<br />

Q: I am not able to access my table from the Grid when I use a specific condition. But if no condition is<br />

applied, it works fine. Why is that<br />

A: You should check for the following items:<br />

<strong>InduSoft</strong> Web Studio Page 499

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!