Adapter GetSQLboolean Method MVC+ (Model-Facade-View-Controller) Framework for ASP.NET
Gets database boolean value (must be overridden by derived class.)

Namespace: NovaDimension.Data
Assembly: NovaDimension.Data (in NovaDimension.Data.dll) Version: 4.0.204.0 (4.0.0204.0)
Syntax

public abstract short GetSQLboolean(
	short pValue
)

Return Value

Type: Int16
Database boolean value

Implements

IAdaptable GetSQLboolean(Int16)
Exceptions

Examples

This sample shows how to override the GetSQLboolean(Int16) abstract method.
See Also: AdapterException, LogHelper T 
using system;
using System.Text;
using System.Data.SqlClient;
using NovaDimension.Component;
using NovaDimension.Data;

public class SQLServerAdapter : Adapter
{
    public override Int16 GetSQLboolean(Int16 pValue)
    {
        try
        {
            LogHelper<SQLServerAdapter>.DebugBegin(System.Reflection.MethodBase.GetCurrentMethod().Name);
            return (pValue == 0) ? Convert.ToInt16(0) : Convert.ToInt16(1);
        }
        catch (Exception ex)
        {
            throw new ExceptionEx<AdapterException>(EnumHelper.Value(AdapterException.ERROR_GETSQLBOOLEAN), ex, true);
        }
        finally
        {
            LogHelper<SQLServerAdapter>.DebugEnd(System.Reflection.MethodBase.GetCurrentMethod().Name);
        }
    }
}
See Also