How do I make a recordset updatable?
I need to specify something when i 'Open' the recordset...?
Tell me what to do!
/Peter
Printable View
How do I make a recordset updatable?
I need to specify something when i 'Open' the recordset...?
Tell me what to do!
/Peter
If u would to use Update function first u must call first AddNew or Edit function.
If there anything else u want please say more detalied
Regards,
Ovidiu
Well, when I'm using this line to open the recordset...Don't I have to tell the 'Open' statement that the recordset is updatable?
recset.Open(CRecordset::snapshot,sSql/*,Don't I have to specify something here*/);
And then after this I will have something like this:
sSql = "INSERT INTO HMDVAR (1,2) VALUES ('first','second')";
db.ExecuteSQL(sSql);
/Peter
No u don't nedd. But if u want to see changes made it by
db.ExecuteSQL( sSql );
u must do this:
recset.Requer();
Let me know if this help u
Regards,
Ovidiu
No u don't nedd. But if u want to see changes made it by
db.ExecuteSQL( sSql );
u must do this:
recset.Requery();
Let me know if this help u
Regards,
Ovidiu
When I execute the program this error is shown: Operation must use an updatable query.
And,..when I make a test:
if (recset.CanUpdate())
{
MessageBox("It can Update!");
}
...well, I'm not shown any messagebox!?
Further suggestions?