|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
[SOLVED]Accessing CONTAINER_CONTENT field in fmc.AUDIT_TRAIL |
« View previous topic :: View next topic » |
Author |
Message
|
jmac |
Posted: Thu Feb 10, 2005 8:26 am Post subject: [SOLVED]Accessing CONTAINER_CONTENT field in fmc.AUDIT_TRAIL |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
Has anyone ever successfully accessed this column using java?
I am sure that I am just doing something silly wrong here, but I can just not seem to get at the blob.
My code looks like this
Code: |
statement.setString( 1, processInstance );
resultSet = statement.executeQuery( );
metaData = resultSet.getMetaData( );
....
if (columnNames[colIndx].equalsIgnoreCase("CONTAINER_CONTENT"))
{
System.out.println("type is " + metaData.getColumnTypeName(i));
Blob blobObj = resultSet.getBlob(i);
System.out.println(blobObj );
}
|
The output produced looks like this
Code: |
Query string is 'SELECT CREATED, EVENT, CONTAINER_CONTENT FROM FMC.AUDIT_TRAIL WHERE PROCESS_NAME LIKE ?'
type is BLOB
null |
I feel certain that there is data in the 21082 record, because I can retrieve the GDC from the ProcessInstance I am using for my test, and display the GDC contents via the Container API.
I am running Windows XP.
WebSphere MQ Workflow Version 3.4.0.6 is installed.
java version "1.4.0_01"
The DBMS name is DB2/NT (version 08.01.0003).
If you can tell me where I am going wrong it will be greatly appreciated. _________________ John McDonald
RETIRED
Last edited by jmac on Thu Feb 10, 2005 1:59 pm; edited 1 time in total |
|
Back to top |
|
 |
javaboy |
Posted: Thu Feb 10, 2005 10:50 am Post subject: A suggestion? |
|
|
Newbie
Joined: 19 Aug 2004 Posts: 1 Location: Syracuse, NY
|
Its been a while since I tested blob functionality with DB2, but I seem to recall not using getBlog but using getBytes() and it worked. Maybe getUnicodeStream() will work as well?
????
HTH |
|
Back to top |
|
 |
jmac |
Posted: Thu Feb 10, 2005 10:56 am Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
javaboy:
Thanks... I tried the getBytes()... I am suspecting I must have something silly in my code, and will go back and have to look more closely.
Thanks again _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
jmac |
Posted: Thu Feb 10, 2005 2:04 pm Post subject: |
|
|
 Jedi Knight
Joined: 27 Jun 2001 Posts: 3081 Location: EmeriCon, LLC
|
I was going to just delete this post to avoid embarrassment
I just had a silly mistake in the part of the code I snipped out, so the code being shown above does get the blob. Of course, once you have the blob you need to put it into a more useful form. _________________ John McDonald
RETIRED |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|