cesarfong
08-14-2003, 03:30 PM
hi i am developing an ATL for being consumed by an evb app. So this method "DropTable" only works when I don´t have use the object store just before.
But when i am calling apis i.e. CeReadRecordPropsEx or CeSeekDatabase before using this method... it didn't eliminate the table!!!
any help???
STDMETHODIMP CAccesoOS::EliminarTabla(BSTR Nombre)
{
#ifdef UNDER_CE
CEOID CeOid=0;
HANDLE tHandle;
tHandle=CeOpenDatabase(&CeOid,Nombre,0,0,NULL);
CloseHandle(tHandle);
CeDeleteDatabase(CeOid);
#endif
return S_OK;
}
i have found that after CeDeleteDatabase(CeOid); it returns me ERROR_SHARING_VIOLATION when i have used the database.. and 0 (it delete) when i call this function after all.
any idea how to avoid ERROR_SHARING_VIOLATION, cause CloseHandle doesn´t work
Thx in advanced
César
http://www.pocketpcdn.com/forum/viewtopic.php?p=2157#2157
But when i am calling apis i.e. CeReadRecordPropsEx or CeSeekDatabase before using this method... it didn't eliminate the table!!!
any help???
STDMETHODIMP CAccesoOS::EliminarTabla(BSTR Nombre)
{
#ifdef UNDER_CE
CEOID CeOid=0;
HANDLE tHandle;
tHandle=CeOpenDatabase(&CeOid,Nombre,0,0,NULL);
CloseHandle(tHandle);
CeDeleteDatabase(CeOid);
#endif
return S_OK;
}
i have found that after CeDeleteDatabase(CeOid); it returns me ERROR_SHARING_VIOLATION when i have used the database.. and 0 (it delete) when i call this function after all.
any idea how to avoid ERROR_SHARING_VIOLATION, cause CloseHandle doesn´t work
Thx in advanced
César
http://www.pocketpcdn.com/forum/viewtopic.php?p=2157#2157