Created On:  20 September 2011

The reason why this occurs is that the column stated contains a data type that is unknown to SilkTest - such as a Globally Unique Identifier (GUID)data type in SQL Server. The below testcase results in this error when the column "firsta" is of type globally unique identifier (GUID) in SQL Server:
 
*** Error: SQL_TYPE (-11) in column (first) not supported
 
[-] testcase supportsample () appstate none
    [ ] HDATABASE hdbc2 // handle for the database
    [ ] STRING sSQL // sql query
    [ ] HSQL hSQL // handle for executing the query
    [ ] STRING sDataSourceName
    [ ] STRING sConnectionString
    [ ]
    [ ] sDataSourceName = "mydsn;SRVR=mymachine\SILKTESTW;UID=myusername;PWD=mypassword"
    [ ] sConnectionString = "DSN={sDataSourceName}"
    [ ]
    [ ] hdbc2 = DB_Connect(sConnectionString)
    [ ]
    [ ] sSQL = "SELECT * from mytable WHERE first = 'd9637bfa-d6c0-4f17-a04c-3ae204865ff4'"
    [ ]
    [ ] hSQL = DB_ExecuteSql(hdbc2, sSQL)
    [ ] LIST OF STRING lsOutput
    [-] while(DB_FetchNext(hSQL, lsOutput))
            [ ] Print(lsOutput)
    [ ] DB_Disconnect(hdbc2)

This can be overcome by using CAST within the SQL statement to cast the data type to a data type known to SilkTest, you will need to use CAST in both the SELECT clause and the WHERE clause in this SQL query, as both work with the unsupported data type. Specifying '*' for all data is not possible here as you need to cast the unsupported data type, therefore you will need to specify all columns that you want returned.

[-] testcase supportsample () appstate none
    [ ] HDATABASE hdbc2 // handle for the database
    [ ] STRING sSQL // sql query
    [ ] HSQL hSQL // handle for executing the query
    [ ] STRING sDataSourceName
    [ ] STRING sConnectionString
    [ ]
    [ ] sDataSourceName = "mydsn;SRVR=mymachine\SILKTESTW;UID=myusername;PWD=mypassword"
    [ ] sConnectionString = "DSN={sDataSourceName}"
    [ ]
    [ ] hdbc2 = DB_Connect(sConnectionString)
    [ ]
    [ ] sSQL = "SELECT CAST (first as varchar(36)), second, third  from mytable WHERE first = (CAST('d9637bfa-d6c0-4f17-        a04c-3ae204865ff4' as VARCHAR (36)))"
    [ ]
    [ ] hSQL = DB_ExecuteSql(hdbc2, sSQL)
    [ ]
    [ ] String a
    [ ] Integer b
    [ ] String c
    [ ] 
    [-] while(DB_FetchNext(hSQL, a, b, c))
            [ ] Print("{a}, {b} , {c}")
    [ ] DB_Disconnect(hdbc2)
Incident #2536548