Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seeing current indexes defined on an SQL server
Message
From
30/08/2000 10:46:16
 
 
To
30/08/2000 10:32:49
Stephen Hunt
Admit Computer Services Inc.
Farmingdale, New York, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00410328
Message ID:
00410748
Views:
15
>Does that mean that I cannot view these indexes in VFP ? similar to select a table in my database clicking on
>modify structure, and then clicking on the index tab ?
>
>Thanks once again
>Stephen J. Hunt

You can view them, but not like modifying the table and clicking on an Indexes tab. The results are returned into a cursor.

e.g., using an ODBC connection called "pubs" into the SQL Server pubs database
lnHnd = SQLCONN("pubs","sa","")
** assuming we got it
lnResult = SQLEXEC(lnHnd, "sp_helpindex 'authors'", "authors_indexes")
SQLMORE(lnHnd)
BROWSE LAST && new cursor is selected
My access to my SQL Server is down right now, and I don't remember the field names, but I remember them being pretty easy to figure out.
The SQL Books Online help is very good - check out sp_helpindex there for more details.

You can fire any SQL Server command, sp, etc., with SPT, as long as the user name/password you connect with has the appropriate rights.
So, after you view these indexes, you can fire another SQLEXEC() to drop one, create a new one, etc.

HTH
Insanity: Doing the same thing over and over and expecting different results.
Previous
Reply
Map
View

Click here to load this message in the networking platform