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 />

Because the provider is only installed on the device and not on your development workstation, you cannot<br />

select it in the Data Link Properties dialog when you develop your project. Instead, you must manually enter<br />

the connection string using the following format:<br />

Version<br />

SQL CE 2.0<br />

SQL CE 3.0<br />

SQL CE 3.5<br />

Connection String<br />

Provider=SQLCE; Data Source=database_path<br />

Provider=SQL_CE3.0; Data<br />

Source=database_path<br />

Provider=SQL_CE3.5; Data<br />

Source=database_path<br />

Examples:<br />

Note: The database interface was fully tested with these versions of SQL CE. However, other<br />

versions might also be supported; please contact Customer Support for more information.<br />

• Access a database file at the fixed location \Harddisk\MyDatabase.sdf:<br />

Provider=SQLCE; Data Source=\Harddisk\MyDatabase.sdf<br />

The exact path depends on how your device's non-volatile memory is organized. Please consult the<br />

manufacturer's documentation.<br />

• Access a database file at the location specified by the String tag DatabaseFile:<br />

Provider=SQLCE; Data Source={DatabaseFile}<br />

The curly brackets ({}) indicate that it's a tag reference.<br />

Please keep in mind that SQL CE is only intended for lightweight databases and simple transactions. It<br />

cannot efficiently handle large amounts of data, such as the Alarm and Event histories. In those cases, we<br />

recommend that you either use the Proprietary history format or use a more powerful relational database like<br />

the full version of Microsoft SQL Server. If you must use SQL CE, then we recommend that you use it only as<br />

a Secondary database with the Store and Forward option selected. For more information, see Saving your alarm<br />

history / event log to an external database.<br />

Caution: When using a Database worksheet or the DB/ERP functions to access a SQL CE<br />

database, remember…<br />

• Column/field names must match exactly or the database commands will fail; and<br />

• IWS data types will be converted into possibly unexpected SQL data types. The following table<br />

shows how they're converted:<br />

IWS<br />

Boolean<br />

Integer<br />

Real<br />

String<br />

SQL CE<br />

int<br />

int<br />

real<br />

nvarchar<br />

Page 508<br />

<strong>InduSoft</strong> Web Studio

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

Saved successfully!

Ooh no, something went wrong!