See Also: Ignore Warnings
Indicates warnings should be ignored or passed on as errors.
Driver
The DataFlex SQL Drivers (SQL Server, DB2 and ODBC), revision 5 and higher
Boolean, temporary
Read/Write
True, False
Use cli.pkg
Get_Attribute DF_DRIVER_IGNORE_WARNINGS of {driverNumber} to {BooleanVariable}
Set_Attribute DF_DRIVER_IGNORE_WARNINGS of {driverNumber} to {True|False}
SQL reports warnings and errors via the same mechanism. The SQL Database Drivers report both the warnings and the errors as an error to the runtime environment. The DataFlex environment has no warning concept. This driver attribute can be used to switch of reporting warnings as errors; they are not reported at all when set to true.
This default value is copied to database level when logging in to the database. The actual value in use for an active connection is that on database level. This attribute merely reflects a default.
Function DriverIndex String sDriver Returns Integer
String sCurrentDriver
Integer iNumberOfDrivers iDriver iCount
Move 0 to iDriver
Get_Attribute DF_NUMBER_DRIVERS to iNumberOfDrivers
For iCount From 1 To iNumberOfDrivers
Get_Attribute DF_DRIVER_NAME of iCount To sCurrentDriver
If ( Uppercase(sCurrentDriver) = Uppercase(sDriver) ) Begin
Move iCount to iDriver
End
Loop
Function_Return iDriver
End_Function // DriverIndex
Procedure ShowDriverAttribute
Boolean bAttribValue
Integer iDriver
Get DriverIndex "MSSQLDRV" to iDriver
Get_Attribute DF_DRIVER_IGNORE_WARNINGS of iDriver to bAttribValue
Showln "Ignore warnings: " (If(bAttribValue, "YES", "NO"))
End_Procedure
The sample code above shows the current setting for a given driver.