//
//
//                                GBase.
//
//                           PROPRIETARY DATA
//
// Licensed Material - Property Of GBase
//
// "Restricted Materails of GBase"
//
// GBase Client SDK
//
// (c)  Copyright GBASE  1997, 2004. All rights reserved.
//  Author             : Satyan
//  Last Modified      : March/05/2002
///////////////////////////////////////////////////////////////////////////




// CLSID For GBase Client Side OLE DB Provider
const GUID CLSID_IFXOLEDBC = {0xa6d00422, 0xfd6c, 0x11d0,
 { 0x80, 0x43, 0x0, 0xa0, 0xc9, 0xf, 0x1c, 0x59 } };




class DbConnect
{
public:
	DbConnect( void );
	
    HRESULT MyOpenDataSource( REFCLSID ClassID, 
					const CHAR *DsnName, 
                    const CHAR *UserName, 
                    const CHAR *PassWord );

    HRESULT MySetAllProperties( 
   					const CHAR *DsnName, 
                    const CHAR *UserName, 
                    const CHAR *PassWord );

	HRESULT MyCloseDataSource( void );
	HRESULT MyCreateSession( void );
	HRESULT MyDeleteSession( void );
	HRESULT MyCreateCmd( void );
	HRESULT MyDeleteCmd( void );
	HRESULT MyExecuteImmediateCommandText( WCHAR *wSQLcmd );


private:
	IDBInitialize		*pIDBInitialize;
	IUnknown			*pSession;
	ITransactionJoin	*pITransactionJoin;
	ICommandText		*pCommandText;
};


