Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Strange problem using OLE DB Consumer Templates

Strange problem using OLE DB Consumer Templates

Scheduled Pinned Locked Moved Database
databasesql-serverwpfcomsysadmin
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lisoft
    wrote on last edited by
    #1

    I'm writing a program to access the SQL SERVER using OLE DB Consumer templates. There was a strange problem found when I was trying to modify row data using CRowset::SetData method. Here is some key source code: CDBPropSet ps(DBPROPSET_ROWSET); ps.AddProperty(DBPROP_IRowsetChange,true); ps.AddProperty(DBPROP_UPDATABILITY,DBPROPVAL_UP_CHANGE | DBPROPVAL_UP_INSERT | DBPROPVAL_UP_DELETE); //... Ctheclass record; //class Ctheclass : public Command<CAccessor<CtheAccessor> > record.Open(session,_T("TABLE_NAME"),&ps) _tcscpy(record.column1,_T("Data to modify")); record.SetData(); The problem is that sometime these code runs ok and the row data has been modified as expected but sometime the row data did not changed even the SetData() method returned S_OK. Can any tell me if there is something wrong with my code or something I was missing.

    Lisoft

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups