Files
ayanova7/archive/ayanova 1.9.4 CE final release db schema 171/sp/GZRset.h

136 lines
3.6 KiB
C++

// GZRset.h: interface for the CGZRset class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GZRSET_H__31F5EB01_0F99_11D4_964F_00C0F02C4B69__INCLUDED_)
#define AFX_GZRSET_H__31F5EB01_0F99_11D4_964F_00C0F02C4B69__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
//NOTE: Un comment this to log database calls to disk
//#define _RSTRACE_ 1
#ifdef _RSTRACE_
#include "logtrace.h"
#endif
class GZRset
{
public:
//Added 08/03/2001
bool m_bSupressErrors;
bool m_bSQLServer;
int FetchFieldType(CString fld);
_ConnectionPtr pTheConnection;
CString SetFieldToMemo(CString fld);
void SetErrMsg(CString strErrorID);
CString m_strLastQuery;
CString GetRSInfo();
bool m_bRSPRINT;
bool m_bPrinting;
int m_nID;
bool m_bReserved;
bool SetToPrint(bool bPrinting);
bool m_bInUse;
bool m_bExclusiveConnection;
CString m_strCloseQuery;
void SetErrorMsg(CString strError);
void Initialize(CString strError);
CString m_strLiveConnectString;
CString m_strLiveConnectStringExclusive ;
CString m_strDeadConnectString;
bool m_bIsClosed;
bool Valid();
CString GetLastError();
bool Query(CString strQuery);
bool QueryReadOnly(CString strQuery);
bool m_bForwardOnly;
bool Close();
_RecordsetPtr RecordSetPointer();
bool SaveRecord();
bool AddNewRecord();
//old execute queries, should be removed
//once no longer used anywhere else
//bool Execute(CString strQuery);
//bool Execute(CString strQuery, long* lIdentity);
//New execute queries
bool Ex(CString strQuery);
bool Ex(CString strQuery, long* lIdentity);
bool MoveBack();
bool MoveForward();
bool MoveLast();
bool MoveFirst();
bool IsEmpty();
bool FetchAllTextFieldsAsOneString( CString *strValue);
bool FetchAnyFieldAsString(CString fld, CString* strValue);
bool FetchField(CString fld, long* lValue);
bool FetchField(CString fld, float* fValue);
bool FetchField(CString fld, bool* bValue);
bool FetchField(CString fld, CString *strValue);
bool FetchField(CString fld, COleDateTime *dtValue);
bool FetchField(CString fld, COleCurrency *crValue);
//Byte type defined as 0-255
bool FetchField(CString fld, unsigned char* byteValue);
bool UpdateField(CString fld, long* lValue);
bool UpdateField(CString fld, float* fValue);
bool UpdateField(CString fld, bool* bValue);
bool UpdateField(CString fld, CString *strValue);
bool UpdateField(CString fld, COleDateTime *dtValue);
bool UpdateField(CString fld, COleCurrency *crValue);
//byte value defined as 0-255
bool UpdateField(CString fld, unsigned char* byteValue);
long FetchRecordCount();
void SetConnect(CString str);
//OBSOLETE
/*
bool OpenForwardOnly(CString strQuery);
bool Open(CString strQuery);
bool Open();
bool ChangeCursorLocation(bool bUseClient);
bool Flush(_ConnectionPtr pConnection);
*/
//========================
GZRset(CString strErr);
GZRset(CString strErr,bool bUseClientCursor);
virtual ~GZRset();
private:
#ifdef _RSTRACE_
CLogTrace* log;
#endif
_ConnectionPtr pConnection;
CString m_strErrMsg;
CString m_strLastError;//last error string
//string because it seems to be the only reliable
//error message you get with ADO
bool m_bNoRecords;
long m_lRecordCount;
_RecordsetPtr m_pRecordSet;
bool m_bOpen;
long m_lCurrentRecord;
CString m_strConnect;
public:
// Forces updates within transactions for immediate write purposes only (not for it's intended purpose)
bool m_bUseTransactions;
};
#endif // !defined(AFX_GZRSET_H__31F5EB01_0F99_11D4_964F_00C0F02C4B69__INCLUDED_)