Forum Discussion
Rather than "Value", you might want to use the GetChunk method. What you'll need to do is get the ActualSize of the field and then use GetChunk to retrieve it. I've not tested this but it might look something like this:
rs.MoveFirst(); var blobSize = rs.Fields("slices").ActualSize; var blob = rs.Fields("slices").GetChunk(blobSize);
- AlexKaras9 years ago
Champion Level 1
Sample code example for Robert's reply:
- mugheessiddiqui9 years agoContributor
Thanks Now I have gotten Blob object.
Second Issue is to Cast the Blob object in some list/dictionary type object of JavaScript for traversing. As I told you we have stored blob object type of System.Collection.Generic.List of Double.
I have found the following description of System.Collection.Generic.List that takes the "<CLRType> collection" object. I don't know how to define <CLRType> collection object.
Description: System.Collection.Generic.List`1 zctor_3(<CLRType> collection);
So far code looks like and I get type Mismatch error.
rs.MoveFirst(); var blobSize = rs.Fields("slices").ActualSize; var blob = rs.Fields("slices").GetChunk(blobSize); var objList = Aliases.appName.AppDomain("appUI.exe").dotNET.System_Collections_Generic.List_1.zctor_3(blob); // Gives "Type Mismatch Error"
- tristaanogre9 years agoEsteemed Contributor
if your Blob is an image, it's not a collection. A collection is an object that has fields and properties and items. At least, that's my understanding.
I don't know the specific collection object you are trying to use so I can't help you further.
- mugheessiddiqui9 years agoContributor
No Blob is not an image, it's an serialized object of System.Collections.Generic.List.
- AlexKaras9 years ago
Champion Level 1
Hi,
I am not absolutely sure, but I think that you should:
-- Register relevant (system.dll?) .Net assembly in dotNet Bridge in TestComplete and
-- Use something like
var objList = dotNET.Syst
em_Collections_Generic.List_1.zctor_3(blob); in your code.
As a result, objList variable should contain deserialized list of doubles that cannot be used 'as is' in your test code and must be converted to array or delimited string or something like that that can be iterated and used in JScript.
- mugheessiddiqui9 years agoContributor
System.Collection.Generic.List included in mscorlib.dll and it is already available in Test Complete.
I think I have to deserialize the object but not sure how to do it.