not able to update Table using ADO Recordset.
- From: saxenavaibhav17@xxxxxxxxx
- Date: Thu, 28 Jun 2007 08:35:51 -0700
Hi All;
Actually I want to write path in a table "TechDBFormsPathTable" of
column " path "
Recordset gets the correct value but its not writting into the table
"TechDBFormsPathTable"
if I try in independent application when recordset is closed. it is
updated.
in this scenerio i can't close the recordset.
if i tried i got error "Insufficient key column information for
updating or refreshing"
update() function is not working ...same eror is coming...
bottomline...... " not able to update table at run time"
recSet.Open(dbOpenTable, _T("qryGetDatabaseName")); // stored
query with select statement
if (recSet.GetRecordCount() > 0)
{
CDaoFieldExchange* pFX = NULL;
if(bWriteToTable)
pFX = new CDaoFieldExchange(StoreField, &recSet);
else
pFX = new CDaoFieldExchange(LoadField, &recSet);
recSet.DFX_Text(pFX, _T("path"), m_cwTechDBPath);
if(pFX)
delete pFX;
BOOL CDaoRecordset::DFX_Text(CDaoFieldExchange* pFX, CString strName,
CString& strVal)
{..................
_variant_t varVal((_bstr_t)strVal);
m_pQueryRecordset->GetInnerObject()->Fields->Item[bstrName]->Value =
varVal;
it is storing properly but not updating into the table of field path.
}
Stored query qryGetDatabaseName contain " SELECT
[TechDBFormsPathTable].[Path]
FROM TechDBFormsPathTable"
table TechDBFormsPathTable contain only field path having data type
memo which supposrts Unicode .
Pls Pls help me out .. I am trapped...
Thanks in advance....
.
- Prev by Date: not able to update Table using ADO Recordset.
- Next by Date: not able to update Table using ADO Recordset. Options
- Previous by thread: not able to update Table using ADO Recordset.
- Next by thread: not able to update Table using ADO Recordset. Options
- Index(es):
Relevant Pages
|