Im using the following to bind data from a recordset, and then I can open
close, modify etc everything just fine. But what do I bind to the recordset
in order to store a blob on it? Another program needs to store and recall a
file stored within the database, but I have no clue what to bind it to. Any
help would be most appreciated.
class CEventHistory : public CADORecordBinding
{
BEGIN_ADO_BINDING(CEventHistory)
file://Column empid is the 1st field in the recordset
ADO_VARIABLE_LENGTH_ENTRY2(1, adInteger, m_sz_HistoryID,
sizeof(m_sz_HistoryID), lemp_HistoryID, TRUE)
ADO_VARIABLE_LENGTH_ENTRY2(2, adInteger, m_sz_ProductID,
sizeof(m_sz_ProductID), lemp_ProductID, TRUE)
ADO_VARIABLE_LENGTH_ENTRY2(3, adInteger, m_sz_EventID,
sizeof(m_sz_EventID), lemp_EventID, TRUE)
// ADO_VARIABLE_LENGTH_ENTRY2(4, adVarChar, m_sz_Data,
// sizeof(m_sz_Data), lemp_Data, TRUE)
ADO_VARIABLE_LENGTH_ENTRY2(5, adChar, m_sz_Text,
sizeof(m_sz_Text), lemp_Text, TRUE)
ADO_VARIABLE_LENGTH_ENTRY2(6, adDBDate, m_sz_Date,
sizeof(m_sz_Date), lemp_Date, TRUE)
ADO_VARIABLE_LENGTH_ENTRY2(7, adDBTime, m_sz_Time,
sizeof(m_sz_Time), lemp_Time, TRUE)
END_ADO_BINDING()
public:
int m_sz_EventID;
int lemp_EventID;
int m_sz_HistoryID;
int lemp_HistoryID;
int m_sz_ProductID;
int lemp_ProductID;
CTime m_sz_Time;
CTime lemp_Time;
CTime m_sz_Date;
CTime lemp_Date;
char m_sz_Text[51];
char lemp_Text[51];
Quote:};