Database Interface The paramters are grouped into three sections — Providers , Communication , and Connection — but all of the parameters for configuring database providers are listed in the Providers section of the file. The default values are specified in the beginning of the file, using the prefix "Default" in each parameter as shown below:
[Providers] DefaultSaveMSec=3 DefaultAssembly=System.Data DefaultConnectionClass=System.Data.OleDb.OleDbConnection DefaultDataAdapterClass=System.Data.OleDb.OleDbDataAdapter DefaultCommandBuilderClass=System.Data.OleDb.OleDbCommandBuilder DefaultValueString=@Value DefaultValueAddNumber=1 DefaultBoolType=INTEGER DefaultIntegerType=INTEGER DefaultRealType=REAL DefaultStringType=VARCHAR(255) DefaultTimeStampType=DATETIME DefaultSingleConnection=0 The next item on the file lists the amount of providers: Count=5 The providers are identified by the "Provider" parameter followed by a number.
When connecting to a database, the Provider parameter in the connection string is compared to the provider's identification, in order to determine which provider will be used. If there is no provider with the value on the connection string, all the default values are assumed. Besides its identification, each provider can have its own value per each parameter. Again, if no value is specified, the default is used. Below is an example with seven providers:
Count=7 Provider1=MICROSOFT.JET.OLEDB InduSoft Web Studio Page 405 Section of .IN I PFailreameter Accepted Values Description ValueAddNumber 0 or 1 Indicates whether a sequential number should be added to the ValueString to identify the parameter or not. For Microsoft SQL database, this parameter should have the value 1, because parameters are identified by using @Value1, @Value2, …, @ValueN. For ODBC, this parameter should be 0. BoolType Any string representing a valid data type for the database When trying to create columns to store boolean values, the data type specified on this parameter will be used. You need to make sure that the data type specified is able to save boolean values.
IntegerType Any string representing a valid data type for the database When trying to create columns to store integer values, the data type specified on this parameter will be used. You need to make sure that the data type specified here is able to store 32 bit values. RealType Any string representing a valid data type for the database When trying to create columns to store real values, the data type specified on this parameter will be used. You need to make sure that the data type specified here is able to store 64 real values.
StringType Any string representing a valid data type for the database When trying to create columns to store string values, the data type specified on this parameter will be used. You need to make sure that the data type specified is able to save the number of characters that you are willing to save on your project. TimeStampType Any string representing a valid data type for the database When trying to create columns to store TimeStamp values, the data type specified on this parameter will be used. EnableTop 0 or 1 When this field is set to 1, the ADO will place the TOP in the SQL statement to limit the amount of registers required.
SingleConnection 0 or 1 When this field is set to 1, the ADO will open only one connection with the database, regardless of how many tasks or computers are requesting services from it. The synchronization between the tasks will be performed by the gateway, and they will not be able to be executed simultaneously if this option is enabled. Communication TimeOut 2 Time out to perform insert and update operations LongTimeOut 5 Time out to perform connection and query updates SyncTimeOut 60 Time out to perform synchronization Connection RegBufSize 128 Size of the internal buffer used by the database API.