on 03-14-2014 9:25 AM
Hi ,
I have created a Class for a upload pictures to the IDM Database .
Now I have the problem with the upload.... and the mssql datatype.
At the moment the type is binary(max)
is there any option to add a byte[] to DSEntry.put ?
It seems that DSEntry always try a cast to string , and when put a byte[] I receive an exception.
Regards
Have someone any solution ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Daniel,
What version of IDM are you using and what type of attribute are you using to store the picture?
Matt
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Usually binary values are B64 or HEX encoded during processing in IdM. I take it you're trying to write it to a column of datatype binary, not an actual IdM attribute. Perhaps you should use varbinary(max) if you want to exceed 8000 bytes. But, the internal datatypes and the JDBC datatypes are not the same, so for SQL Server you need to use LONGVARBINARY.
see this MicroSoft reference: Using Advanced Data Types
Anyway, here's a working example. The $includebin function is documented in the helpfile but its usage is pretty self explaining in my example here:
My table looks like this:
Hi Per ,
thx for the info ...
And how can add a Binary variable from Java to the DSEntry ?
At the moment I have a byteArray
public DSEEntry next() {
....
byte[] xmlBytes = jcoField.getByteArray();
entry.put(jcoField.getName(),xmlBytes);
....
But with this I receive an Exeption I think the DSEntry does a cast in String ?
Regards
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.