Hi all, I’m very new to both UiPath and SQL server, and help needed here to advice on how to get OID data from SQL server table in string format.
Case:
in SQL server table, for example, the OID is 0xABCDEFG123
but when using “assign” in UiPath to retrieve this data, it will show System.Byte instead of showing 0xABCDEFG123.
the assign formula i’m using is: OID_string = DT.Rows(0).item(“columnname”).tostring
Can you see what is the data type of the OID in the data table if its a string you can directly get string using SQLTestDT.Rows(0).Item(0).ToString
Make the testOID as String variable.
We highly recommend to start working with the debugging panels e.g. the immediate panel
when working with a complex complex datatype ( e.g. an Array of X) the ToString() is NOT returning a representation of items, but the DataType Name instead
This you can clearly see within the logs
Also when the DataTable Column value is a complex DataType we have to cast it for the retrieval like
DirectCast(SQLtestDT.Rows(0)(0), Bytes() )
From above we cannot derrive any relationship between first and second screenshot, but you can still try to use other conversion approaches like the Cast method