CoDavid
October 21st, 2005, 10:03 AM
...
CCommand<CDynamicAccessor> rs;
...
//i successfully opened the database, and displayed the data in it
//and i can use SetData() to update change, but when i use Insert()...****!
LPWSTR pwszName = (LPWSTR)rs.GetValue(1);
wcscpy(pwszName, L"uu"); //nchar(16) in ms-sql
rs.SetLength(1,16);
rs.SetStatus(1, DBSTATUS_S_OK);
rs.ReleaseRows();//if i dont use this, Insert will return DB_E_ROWSNOTRELEASE
rs.Insert();//returns DB_E_ROWSNOTRELEASE
rs.Update();returns DB_E_ERROROCCURED :(
coule anybody help me out ?? plzzzzzzzzz~~!!!
CCommand<CDynamicAccessor> rs;
...
//i successfully opened the database, and displayed the data in it
//and i can use SetData() to update change, but when i use Insert()...****!
LPWSTR pwszName = (LPWSTR)rs.GetValue(1);
wcscpy(pwszName, L"uu"); //nchar(16) in ms-sql
rs.SetLength(1,16);
rs.SetStatus(1, DBSTATUS_S_OK);
rs.ReleaseRows();//if i dont use this, Insert will return DB_E_ROWSNOTRELEASE
rs.Insert();//returns DB_E_ROWSNOTRELEASE
rs.Update();returns DB_E_ERROROCCURED :(
coule anybody help me out ?? plzzzzzzzzz~~!!!