omron — Database Troubleshooting

Database Interface A : By default, the Database Interface can have a maximum of 1000 connections. When this maximum is exceeded, the oldest connection is automatically closed to allow the new connection and the Output window displays an extended message describing which connection was closed and what was the last command executed. To increase the maximum number of database connections, open the project file ( project_name .app ) in a text editor and change the following setting: [StDB] MaxConnections= number_of_connections Keep in mind that increasing the maximum number of connections may decrease project performance. Q :

I configured my Connection String using the browser and the Data Link Properties Window. When I click the Test button, it says "Test succeeded". However, when I run my project, the Database Interface displays error messages, and I am not able to save data. A : The Data Link Properties Window uses OLE DB to interface with the Database. IWS Database Interface uses ADO.NET; therefore, you can have the OLE DB provider on your machine and be missing the ADO.NET provider. It is also possible that you are using an ADO.NET provider that is not listed in the StADOSvr.ini file. Please refer to Studio Database Gateway for more information about adding ADO.NET providers to the StADOSvr.ini file. Q :

Why, when I update information in one line in the Grid object, is it updating more than one line in my database? A : The grid object issues an update command in the database using the values in all the columns for the specific row t hat you are trying to update. If you have rows with duplicate values, you might see this problem. If your table has a primary key or any other unique field that you do not want to display in the Grid object, you can add it to the Columns but specify the Width 0. This will fix the problem. Q : Why do I have to use a separate Column to store the milliseconds on my database? A : Some databases do not support milliseconds in the Time Stamp field.

IWS Database interface, by default, requires another column for the milliseconds. If your database can handle milliseconds, or if you do not want to record the milliseconds, you can change the default behavior in the Advanced settings. Note that some databases are able to store milliseconds, but they have lower precision. If you mix different databases with different precisions in redundant mode, you can get synchronization problems. Q : My project works fine when I run in emulation mode. But when I send to the Windows Embedded device, it cannot communicate with my database. A :

It might be the case that your Windows Embedded device does not have the .Net Framework or that it does not have the provider that you are using. Try to use the gateway remotely by following the instructions in Linking the Database Through a Remote DB Provider . Q : When I try to connect to the database, why do I receive the message, Error to create connection class ? A : The .Net Provider that you are trying to use is not installed on your machine. This error message is usually followed by the provider name; if you are using the Sybase database, for instance, the message is followed by [iAnywhere.Data.AsaClient.AsaConnection] . The Provider is the iAnywhere.Data.AsaClient.

You can check if the provider is installed on your machine by going to the Control Panel > Administrative Tools > Microsoft .Net Framework x.x Configuration . The provider should be listed in the Assembly Cache . Q : What if I have the provider assembly (usually a .dll file) but it is not listed in the AssemblyCache ? A : If your assembly has a strong name, you can register it in the Assembly Cache using the gcautil program. Or it should work if you copy your assembly to the same folder as the StADOSvr.exe (usually the […]\InduSoft Web Studio v7.0\Bin folder). Q : I am not able to access my table from the Grid when I use a specific condition. But if no condition is applied, it works fine.

Why is that? A: You should check for the following items: 1. Follow the Troubleshooting steps , and look for error messages in the log. An error message can tell you if you have made a mistake, such as entering with a wrong column name or specifying an invalid data format. 2. Some databases have problems when you use reserved words as column names. Therefore, you should avoid using column names such as Time, Date, Numeric, etc. 3. If your column name starts with AND or OR (e.g., ORange), enter the name surrounded by square brackets. For example, instead of ORange=10, enter [ORange]=10. InduSoft Web Studio Page 413