Unicorn XML Toolkit
Version 1.00.00

Namespace Sql
Class CSqlException

class CSqlException: public IException {
public:
    enum {
        cannotCreateEnvironment,
        invalidNumberOfParameters,
        invalidColumnName,
        cannotFetchColumnData,
        databaseInterfaceError
        };
public:
    CSqlException(int nCode);
    CSqlException(int nCode, const CString &strArg);
    CSqlException(
        int nCode, 
        const CString &strArg1, 
        const CString &strArg2);
    CSqlException(
        int nCode, 
        const CString &strArg1, 
        const CString &strArg2,
        const CString &strArg3);
    CSqlException(int nCode, IException *pException);
    ~CSqlException();
public:
    CString ToString();
    };

The exception thrown by database interface functions.

Every exception of this class is assigned an integer exception code. Allowed values for exception codes are specified by the anonymous enumeration contained in this class declaration.

Up to three optional informational strings may be associated with the exception. Alterantively, the exception of this class may be used to wrap information contained in another exception.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
CSqlException (int nCode);
����������Constructs the exception.
CSqlException (int nCode, const CString &strArg);
����������Constructs the exception with one informational string.
CSqlException (int nCode, const CString &strArg1, const CString &strArg2);
����������Constructs the exception with two informational strings.
CSqlException (int nCode, const CString &strArg1, const CString &strArg2, const CString &strArg3);
����������Constructs the exception with three informational strings.
CSqlException (int nCode, IException *pException);
����������Constructs the exception wrapping another exception.
~CSqlException ();
����������Destroys the exception.

Function Summary
CString ToString ();
����������Returns the string representation of this exception.

Constructor/Destructor Detail

CSqlException

CSqlException(int nCode);

Constructs the exception.

Parameters:
nCode - the exception code

CSqlException

CSqlException(int nCode, const CString &strArg);

Constructs the exception with one informational string.

Parameters:
nCode - the exception code
strArg - the informational string

CSqlException

CSqlException(
    int nCode, 
    const CString &strArg1, 
    const CString &strArg2);

Constructs the exception with two informational strings.

Parameters:
nCode - the exception code
strArg1 - the first informational string
strArg2 - the second informational string

CSqlException

CSqlException(
    int nCode, 
    const CString &strArg1, 
    const CString &strArg2,
    const CString &strArg3);

Constructs the exception with three informational strings.

Parameters:
nCode - the exception code
strArg1 - the first informational string
strArg2 - the second informational string
strArg3 - the third informational string

CSqlException

CSqlException(int nCode, IException *pException);

Constructs the exception wrapping another exception.

Parameters:
nCode - the exception code
pException - the exception to be wrapped

~CSqlException

~CSqlException();

Destroys the exception.

Function Detail

ToString

CString ToString();

Returns the string representation of this exception.

Returns:
the string representation of this exception

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.