
Insert in SQL Server CTable<CDynamicAccessor>
Insert is no difference from an update.. below are all that you need (plus
binding the value/status/length yourself)
CDBPropSet propset(DBPROPSET_ROWSET);
propset.AddProperty(DBPROP_IRowsetChange, true);
propset.AddProperty(DBPROP_UPDATABILITY, DBPROPVAL_UP_CHANGE |
DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE);
- Chu
Quote:
> I have a problem. I don't know how to insert row in a table in MS SQL
Server
> using OLE DB Consumer templates.
> Table is
> Key int
> Name char[50]
> Valid bool
> What props do I need to use in opening CTable and how to insert new row
with
> data (1, Matija, false) ? I use CDynamicAccessor as accessor and I must
use
> CDynamicAccessor.
> I know how to read and change data, but not how to insert new !!!
> Thank you.
> P.S. Sorry for my english.