not able to update Table using ADO Recordset. Options



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....

.



Relevant Pages

  • not able to update Table using ADO Recordset.
    ... Recordset gets the correct value but its not writting into the table ... CDaoFieldExchange* pFX = NULL; ... it is storing properly but not updating into the table of field path. ... Stored query qryGetDatabaseName contain " SELECT ...
    (microsoft.public.data.ado)
  • not able to update Table using ADO Recordset.
    ... Recordset gets the correct value but its not writting into the table ... CDaoFieldExchange* pFX = NULL; ... it is storing properly but not updating into the table of field path. ... Stored query qryGetDatabaseName contain " SELECT ...
    (microsoft.public.data.ado)
  • not able to update Table using ADO Recordset. Options
    ... Recordset gets the correct value but its not writting into the table ... CDaoFieldExchange* pFX = NULL; ... it is storing properly but not updating into the table of field path. ... Stored query qryGetDatabaseName contain " SELECT ...
    (borland.public.delphi.database.ado)
  • not able to update Table using ADO Recordset. Options
    ... Recordset gets the correct value but its not writting into the table ... CDaoFieldExchange* pFX = NULL; ... it is storing properly but not updating into the table of field path. ... Stored query qryGetDatabaseName contain " SELECT ...
    (microsoft.public.data.ado)