Board index » cppbuilder » TADODataSet and TADOTable
TumurS
![]() CBuilder Developer |
TADODataSet and TADOTable2007-05-07 11:57:24 AM cppbuilder29 In my previous project there was no problem with working TADOTable object. Inserting, editing, removing and etc worked well. Cursor location and type are client and static. Auto-increment fields values retrieved correctly by engine after inserting new record operation. I dont' remember why I choosed TADODataSet for another project, but now I encountered some problem. CommandType is cmdTable and cursor's location/type are same as above. After inserting a new record it's auto-increment key field has 0 value. I cannot do any further operation on it because the key is wrong. So I added this line just after opening dataset: (*dataset->Properties)[OleVariant(WideString("Update Resync"))]->Value = adResyncAll; (by the way, to refer to above constant I manually included <adodb_xp.h>. is it safe?) Now the new record disappears from local cache just after posting. Any ideas? Also, if my code retrieving all records from the server (i.e. no WHERE), is there any difference between using table and query? P.S. MSSQL2K and BCB6 |