Appendix A
A-68
NJ/NX-series Database Connection CPU Units User’s Manual (W527)
Sample Programming
- Change the variable Warning to TRUE when the Spool usage of the DB Connection named MyDatabase1 has exceeded 80%.
Check the completion of the DB_GetConnectionStatus instruction.
DB_GetConnectionStatus_instance.Done
DB_GetConnection
Status_instance.Error
Get the status of the DB Connection.
DB_GetConnectionStatus_instance
Done
Busy
Error
ErrorID
ConnectionStatus
When the instruction is normally completed, change the value of the variable Warning to TRUE if the Spool usage has exceeded 80%.
DB_GetConnectionStatus_instance.Done
DINT#80
MyStatus.SpoolUsageRate
When the instruction is terminated due to an error, change the variable Warning to FALSE.
DB_GetConnectionStatus_instance.Error
// Error handler
GetServiceStatus_OK := FALSE;