Product Documentation

c-treeDB API for C++ - Developers Guide

Previous Topic

Next Topic

CTResource::Delete

Delete a resource.

Declaration

void CTResource::Delete();

Description

Deletes a resource from a table. Before a resource can be deleted, the table must be opened exclusive. The resource type and resource number that identify this resource must be passed to one of the CTResource constructors.

Return

None

Example


void DelMyResource(const CTTable& hTable, ULONG type, ULONG number)

{

CTResource* hRes = new CTResource(hTable, type, number);

try

{

hRes->Delete();

}

catch (CTException &err)

{

printf("Error %d - %s\n", err.GetErrorCode(), err.GetErrorMsg());

}

delete hRes;

}

See Also

CTResource::Add(), CTResource::Update(), CTResource::First(), CTResource::Next(), CTResource::Find(), CTResource::GetType(), CTResource::SetType(), CTResource::GetNumber(), CTResource::SetNumber(), CTResource::GetName(), CTResource::SetName(), CTResource::GetDataLength(), CTResource::GetData(), CTResource::SetData(), CTResource::Unlock(), CTResource::IsLocked()

TOCIndex