on 01-17-2007 7:26 PM
I have a problem with delete blob object from Binary Table.
I use following code:
try {
//<b>id</b> is my ID recorbd. Ex: "1"
//and <b>repData</b> is my CataloData object
A2iIntArray ids = new A2iIntArray();
ids.Add(Integer.parseInt(id));
CMTableInfo tableMDM = repData.GetTable(TABLE_BINARY_OBJECT);
String[] fieldsMDM = getTableFieldCodeNames(repData,tableMDM.GetCode());
ResultSetDefinition rsd = new ResultSetDefinition(TABLE_BINARY_OBJECT);
for (int nr=0;nr<fieldsMDM.length;nr++){
rsd.AddField(fieldsMDM[nr]);
}
A2iResultSet rs = repData.GetRecordsById(rsd,ids);
A2iIntArray pos = rs.GetIDs();
A2iIntArray changeStamps=rs.GetChangeStamps();
repData.DeleteRecords(TABLE_BINARY_OBJECT,pos,changeStamps);
} catch (Exception e) {
System.out.println("error="+e.getMessage());
}
but return alwasy this error:<b>error=DeleteRecords error </b>
Why?
Someone can help me?
Best regards
You cannot delete blob object if <b>there is a reference to this blob object from some other table.</b>
If ImageA is linked to the Item123, then you cannot delete this ImageA from the Images table unless to remove the links.
In Data Manager, for an image you can see where all this image is refered to, using the <b>Usage Tab of Select Single/Multiple Images selection dialog</b>
This may be the reason for the error when you use the API to delete Images
Hope this helps,
Please mark helpful answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
9 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.