Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Determining primary key in SQL Server
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00457474
Message ID:
00457512
Views:
23
I am not getting this behavior. I am using SQL Server 7.0 SP1, VFP 6.0 SP4, ODBC driver 3.70.08.21 on Windows 2000 Server. I just created a temporary index, with a name 70 character long, and it came back fine. My syntax is slightly different:

? SQLEXEC(1, "EXEC sp_helpindex 'Company'")

>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
Chris McCandless
Red Sky Software
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform