Insert in SQL Server CTable<CDynamicAccessor> 
Author Message
 Insert in SQL Server CTable<CDynamicAccessor>

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.



Mon, 28 Jul 2003 23:31:26 GMT  
 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.



Mon, 28 Jul 2003 15:02:22 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. <<<<<<<Parsing help, please>>>>>>>>

2. OLEDB - CDynamicAccessor and Timestamp SQL Server fields

3. File Format conversion, ascii freeform -->.csv <-->.wk1<-->dbf<-->?HELP

4. <<<>>>Need C code advice with functions and sorting.<<<>>>

5. <><><>HELP<><><> PCMCIA Motorola Montana 33.6

6. >>>Windows Service<<<

7. Binding CTable<CAccessor<AnyTable> > with consumers

8. Trying to insert data into SQL Server

9. SQL Server: Slow INSERT performance??

10. Inserting a Delimited Text File into SQL Server

11. OLEDB, Fail Insert, SQL Server 7

12. How to insert an image into SQL Server?

 

 
Powered by phpBB® Forum Software