04-21-04 08:35 AM
Hi,
here's a small code snippet. It could be improved
but it should give you some ideas to work with.
// Is this a PassThru?
bool IsPassThru=false;
object PT = dict["IsPassThrough"];
if (null != PT)
{
if (DBNull.Value != PT)
IsPassThru = Convert.ToBoolean(dict["IsPassThrough"]);
}
if (IsPassThru)
{
UnicodeEncoding unicBSTR = new UnicodeEncoding();
Byte[] encodedBSTR = unicBSTR.GetBytes((string)dict["working_data"])
;
int biztalkLength = (int) dict["PTDataLen"];
FileStream fs = new FileStream(strLocalFilename, FileMode.Create);
BinaryWriter w = new BinaryWriter(fs);
w.Write(encodedBSTR);
w.Close();
fs.Close();
}
[ Post a follow-up to this message ]
|