I need to retrieve a column from a SQL Server 2000 table with a datatype of Image. <BR>Basically it is binary data not really an image like a jpg or gif file. It is compressed XML. <BR><BR>I need to then pass this binary data to a COM object that expects it as a Variant datatype. <BR><BR>The COM object is the XCeed Streaming Compression Library. The data in the table <BR>was compressed and stored in classic ASP. We are now upgrading the site to ASP.NET. Unfortunately, it doesn&#039;t appear that XCeed has a .NET version of their Streaming Compression Library yet so I need to continue to use the old COM object. <BR><BR>I think all that I have to do is conver the byte[] to an object type that the COM object can handle but I&#039;m not sure which one. <BR><BR>Here is my code: <BR><BR>public bool XmlLoadHierarchy() <BR>{ <BR> string sXML=""; <BR> bool fRet=false; <BR> byte[] oCompXML=null; <BR> SqlConnection oConn = new SqlConnection(); <BR><BR> try <BR> { <BR> oConn.ConnectionString = DBConStr; <BR> oConn.Open(); <BR> SqlCommand oCmd = new SqlCommand("EXEC dbo.GetXML 14523",oConn); <BR> SqlDataReader oReader = oCmd.ExecuteReader(); <BR><BR> while (oReader.Read()) <BR> { <BR><BR> oCompXML = (byte[])oReader["IMAGECOLUMN"]; <BR> <BR> } <BR><BR> oReader.Close(); <BR> oConn.Close(); <BR><BR> sXML = this.XMLDecompress(ref oCompXML); <BR><BR> fRet=true; <BR><BR> } <BR> catch (Exception) { } <BR> finally <BR> { <BR> if (oConn.State == ConnectionState.Open) { oConn.Close(); } <BR> } <BR><BR> return fRet; <BR>} <BR><BR> public string XMLDecompress(ref byte[] oCompXML) <BR> { <BR> bool fLicense; <BR> string sXML=""; <BR> object oXML=null; <BR><BR> try <BR> { <BR><BR> XceedStreamingCompressionLib.XceedStreamingCompres sionClass oComp = new XceedStreamingCompressionLib.XceedStreamingCompres sionClass(); <BR><BR> fLicense = oComp.License("my license key"); <BR><BR> XceedStreamingCompressionLib.XceedBWTCompressionMe thodClass oBWT = new XceedStreamingCompressionLib.XceedBWTCompressionMe thodClass(); <BR><BR> oComp.CompressionFormat = oBWT; <BR><BR> // This is the problem line I think. How can I convert a byte[] array in C# <BR> // to a comparable Variant in COM. <BR><BR> oXML = (object)oCompXML; <BR><BR> sXML = oComp.Decompress(ref oXML, true).ToString(); <BR> <BR> } <BR> catch (Exception) { } <BR> <BR> return sXML; <BR><BR>}