hansaplast
Programmer
Hi,
I've created a dynamic connection to CDatabase object witch I bind to CRecordset.
How do I update the fields in my recordset?
NiceFunction()
{
CDatabase m_database;
CRecordset *p_dbSet;
// Create new recordset with connection to the database object
p_dbSet = new CRecordset(&m_database);
// Open the database
m_database.OpenEx(m_connectionStr);
// Get all from my parameters table
p_dbSet->Open(AFX_DB_USE_DEFAULT_TYPE,"SELECT * FROM parameters"
;
// Here I want to update my fiels from my recordset
// Function below does not exist but explains what I want to do
p_dbSet.SetField("MyField_in_Table", "Whatever I want to put in there"
;
// Close the database and delete the CRecordset
...
}
Tnx in advance,
Hansa
I've created a dynamic connection to CDatabase object witch I bind to CRecordset.
How do I update the fields in my recordset?
NiceFunction()
{
CDatabase m_database;
CRecordset *p_dbSet;
// Create new recordset with connection to the database object
p_dbSet = new CRecordset(&m_database);
// Open the database
m_database.OpenEx(m_connectionStr);
// Get all from my parameters table
p_dbSet->Open(AFX_DB_USE_DEFAULT_TYPE,"SELECT * FROM parameters"
// Here I want to update my fiels from my recordset
// Function below does not exist but explains what I want to do
p_dbSet.SetField("MyField_in_Table", "Whatever I want to put in there"
// Close the database and delete the CRecordset
...
}
Tnx in advance,
Hansa