General information
Title:
Determining primary key in SQL Server
I've been using the sp_helpindex() in SQL server to return a cursor to VFP. I then pull out the index name and expression from the row marked with 'primary key' in the index_description.
I found a problem using ODBC. When I use this code:
?sqlexec(h,"{call sp_helpindex('SpecLink')}", 'csrIDX1')
The index_keys field is returned as a C(30) and any index expressions longer than that have a chr(0) in the 30th character.
This does not show up in query ananlyzer, only with ODBC. I'm using SQL Server 7.0 with SP2 and windows 2000 professional. ODBC driver is 3.70.08.21.
None of the ODBC driver settings seem to have any affect.
Help! I need a fix or another way to get the primary key name and expression.
Thanks,
Mike
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only