W
WenYuan Wang [MSFT]
Hello Manjree,
This is System.NullReferenceException.
I'd like to suggest you check if there is object returned by
expDataTable->Rows->Find(search) method.
Please change your code as below, and check if it will thow
System.NullReferenceException in Line 2.
DataRow^ row = expDataTable->Rows->Find(search);
System::Object^ o=row->default[L"data"];
array<Byte>^ data = (array<Byte>^)o;
Using an Array declaration as casting operator should be the correct method.
Under my test, It works fine.
Please try the above method and let me know if NullReferenceException thown
in Line 2.
System::Object^ o=row->default[L"data"];
Hope this helps,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
This is System.NullReferenceException.
I'd like to suggest you check if there is object returned by
expDataTable->Rows->Find(search) method.
Please change your code as below, and check if it will thow
System.NullReferenceException in Line 2.
DataRow^ row = expDataTable->Rows->Find(search);
System::Object^ o=row->default[L"data"];
array<Byte>^ data = (array<Byte>^)o;
Using an Array declaration as casting operator should be the correct method.
Under my test, It works fine.
Please try the above method and let me know if NullReferenceException thown
in Line 2.
System::Object^ o=row->default[L"data"];
Hope this helps,
Best regards,
Wen Yuan
Microsoft Online Community Support
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.