LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Return GUID from SQL server 7

Hello there,
I need to extract a GUID from my SQL server 7 database. I'm using the SQL toolkit version 5.0 with Labview 6. I can extract all the data types except for my GUID which is a uniqueidentifier data type. When I try to extract a GUID, I get error 4149 "Fetch Next Record - [Microsoft][ODBC Driver Manager] Program type out of range". I'm not using any Unicode data types. For example one of my 16 bit GUIDs looks like " {6F4CD9C5-43D9-4BB4-92C2-772F41FE3004} ". Is this a problem that is solved by upgrading to the DCT? (Database Connectivity Toolkit)

Thanks,
Nathan
0 Kudos
Message 1 of 3
(3,725 Views)
This problem is a SQL Toolkit problem...

A workaround:

SELECT UPPER(guid) FROM [table]

This way SQLServer will return the results in string format.

Regards,

Wiebe.

"tqs engineer" wrote in message
news:5065000000080000007A310000-1005954886000@exchange.ni.com...
> Hello there,
> I need to extract a GUID from my SQL server 7 database. I'm using the
> SQL toolkit version 5.0 with Labview 6. I can extract all the data
> types except for my GUID which is a uniqueidentifier data type. When I
> try to extract a GUID, I get error 4149 "Fetch Next Record -
> [Microsoft][ODBC Driver Manager] Program type out of range". I'm not
> using any Unicode data types. For example one of my 16 bit GUIDs looks
> like " {6F4CD9C5-43D9-4BB4-92C2-772F41FE3004} ". Is this a p
roblem
> that is solved by upgrading to the DCT? (Database Connectivity
> Toolkit)
>
> Thanks,
> Nathan
Message 2 of 3
(3,725 Views)
Works like a charm.
Thanks much,
Nathan

by the way, they are 16 byte GUIDs
0 Kudos
Message 3 of 3
(3,725 Views)