on 03-28-2006 8:41 AM
Hi all,
I am getting a2i.core.StringException: AddRecord error when trying to add binary object in the repository using Java API. The code used is as below:
//Adding values in binary table
byte[] fileBuf = file;
A2iFields fields = new A2iFields();
fields.Add(new A2iField("Data ID", new Value(file)));
fields.Add(new A2iField("Name",new
Value("FileName.extn"));
fields.Add(new A2iField("Original Name",new
Value("FileName.extn"));
fields.Add(new A2iField("Data Group ID",new Value(1)));
fields.Add(new A2iField("Data Size", new
Value(file.length)));
fields.Add(new A2iField("Original Location ID", new
Value(999)));
fields.Add(new A2iField("Description",new Value("a
short description ")));
boolean hasOriginal = false;
fields.Add(new A2iField("Has Original", new
Value(hasOriginal)));
String binaryTable = "<Table Name>";
int recID = catalog.AddRecord(imageTable, fields, -1,
-1);
//Adding values in Products table
A2iFields a2iFields = new A2iFields();
a2iFields.Add(new A2iField("<Field1 Name>", new
Value("<Value1>")));
a2iFields.Add(new A2iField("<Field2 Name>", new
Value("<Value2>")));
a2iFields.Add(new A2iField("<Field3 Name>", new
Value("<Value3>")));
a2iFields.Add(new A2iField("<Field4 Name>", new
Value("<Value4>")));
a2iFields.Add(new A2iField( "<Field name for binary
object>", new Value(recID)));
int id = catalog.AddRecord("Products", a2iFields, 0,
0);
Best Regards,
Jaydeep
Hi Jaydeep,
Have you got any solution for this problem ?
We are also facing the same issue. Let us know if you can throw some light on this.
Regards
Vinay.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.