Complex Data types from a SQL database

Some times you will wish to use a complex data type from a SQL data base. if you do, use a convert() or cast statement in your SQL query to convert the type (such as an identifier or GUID) to a string.

sqlQuery = Select CAST(OrderId as char(36)) FROM Orders WHERE (OrderStatusId = ‘0c6d9b32-f1f0-5cf5-9364-09d94b7b62f4’)