Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SP_HELPINDEX via ODBC
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00175405
Message ID:
00175511
Views:
30
You need to include "EXEC" before the sp name like this:

=SQLExec( handle, "EXEC SP_HELPINDEX ", "rtrnCursor2" )

HTH

>In SQL-Server, there is a stored procedure called SP_HELPINDEX which given a parameter of a table will return a cursor of all the indexes and expressions associated with it.
>
>While doing some processing, I want to make sure that if the tables already existed that I don't try to re-create the indexes. So I have in place the methodology to be sure to issue an ODBC call with
>
>SQLExec( handle, "USE ", "rtrnCursor" )
>SQLExec( handle, "SP_HELPINDEX ", "rtrnCursor2" )
>
>I always get no result set on the second call... Am I missing something simple? or does the original connection to SQL-Server identify which is the default database to be associated with for each SQLExec() being issued?
>
>Any input appreciated...
"It is an important and popular fact that things are not always what they seem. For instance, on the planet Earth, man had always assumed that he was more intelligent than dolphins because he had achieved so much -- the wheel, New York, wars and so on -- whilst all the dolphins had ever done was muck about in the water having a good time. But conversely, the dolphins had always believed that they were far more intelligent than man -- for precisely the same reasons." - Douglas Adams
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform