Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining primary key in SQL Server
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Client/server
Title:
Determining primary key in SQL Server
Miscellaneous
Thread ID:
00457474
Message ID:
00457474
Views:
64
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
Map
View

Click here to load this message in the networking platform