Can I get more context about what you are trying to do? Are you trying to insert a stream to the datasource or retrieve a stream from the datasource or just make a blob in general?
- Log in to post comments
Can I get more context about what you are trying to do? Are you trying to insert a stream to the datasource or retrieve a stream from the datasource or just make a blob in general?
Hello Marcio,
The answer you are looking for can be found in the SerialBlob javadocs: this is the only known provided implementation of the java.sql.Blob interface. In particular, you would like the the SerialBlob(byte[]b) constructor to create a blob in Java.
Hello Magnus,
I recommend that you use a SQL CALL instead of IRIS Native for .Net.
The following CALL query should work: CALL SYS.Mirror_MemberStatusList('NAMEOFTHEMIRROR') and this is no different than using a stored procedure (because MemberStatusList is a class query).
If you do not have a connection to %SYS where SYS.Mirror exists , but the user for your existing connection does have privileges to access %SYS, you can write a wrapper stored procedure something similar to:
CREATE PROCEDURE MirrorMemberStatusList(IN MirrorName %String) RESULT SETS LANGUAGE OBJECTSCRIPT
{
:#Include %occResultSet
new $NAMESPACE
set $NAMESPACE="%SYS"
$$$ResultSet("CALL Sys.Mirror.MemberStatusList('" _ MirrorName _ ')")
}Hello Elize,
Based on the error that you are receiving, it seems that you might be executing a direct SQL statement instead of a parameterized statement. This means that your DateTime object (new DateTime(1900, 1, 1, 12, 03, 30) is being converted to a String and this, in effect, bypasses our ODBC driver's handling of specific nuances regarding temporal types.
%Library.Time expects either a proper time string (denoted by the regex /(\d{2}:){2}\d{2}(.\d*)?/) or an appropriate $HOROLOG value and for this reason, you get SQL error -147.
Nonetheless, there are several solutions you can go about this:
According to the link above, you can set up an automatic task that periodically purges these orphaned messages.
If you set the value of "NumberOfDaysToKeep" to a low value (0 for all messages at the time of purge) and set up a Task to purge messages on a periodic basis, this should meet your needs.