VFP 愛用者社區 首頁 VFP 愛用者社區
本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.
 
 常見問題常見問題   搜尋搜尋   會員列表會員列表   會員群組會員群組   會員註冊會員註冊 
 個人資料個人資料   登入檢查您的私人訊息登入檢查您的私人訊息   登入登入

VFP用什么命令能够列出一张表的全部索引设置?

 
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區
上一篇主題 :: 下一篇主題  
發表人 內容
cathysia



註冊時間: 2004-12-01
文章: 4


第 1 樓

發表發表於: 星期二 十二月 14, 2004 10:13 am    文章主題: VFP用什么命令能够列出一张表的全部索引设置? 引言回覆

我想把一张表里面全部的索引和里面的关键rule列出来,可是找不到相关的命令。

手抄就太笨了。

表的结构就能用 list structure列出来, 那么索引是否也能列出来呢?
回頂端
檢視會員個人資料 發送私人訊息 MSN Messenger
syntech



註冊時間: 2003-05-16
文章: 4249
來自: Taipei,Taiwan

第 2 樓

發表發表於: 星期二 十二月 14, 2004 10:43 am    文章主題: 引言回覆

查一下 KEY()

-----------------------
Example
The following example opens the customer table in the testdata database. FOR ... ENDFOR is used to create a loop in which KEY( ) is used to display the index expression of each index tag in the customer structural index. The name of each structural index tag is displayed with its index expression.
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer && Open customer table
CLEAR

FOR nCount = 1 TO 254
IF !EMPTY(TAG(nCount)) && Checks for tags in the index
? TAG(nCount) + ' ' && Display tag name
?? KEY(nCount) && Display index expression
ELSE
EXIT && Exit the loop when no more tags are found
ENDIF
ENDFOR

_________________
如果公司有下列困擾:
1. 找不到便宜,快速,簡易的 生產排程軟體
2. 不知道如何快速排定 採購計劃
3. 成本抓不準,自己算比軟體算有用
4. 想學習系統規劃,想找系統架構的顧問

請聯絡我們,也許我們幫得上忙
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 AIM Address
小桑•無痕



註冊時間: 2003-07-08
文章: 304
來自: Tainan, Taiwan

第 3 樓

發表發表於: 星期二 十二月 14, 2004 10:54 am    文章主題: 引言回覆

MSDN Help

ATAGINFO( ) Function
Creates an array that contains information about the names, number, and types of indexes and key expressions.

ATagInfo(ArrayName [,cCDXName [, nWorkArea | cTableAlias]])
Parameters
ArrayName
Specifies the name of the array to be created. Visual FoxPro creates the array if it does not already exist.
cCDXName
Specifies the name of the compound index file for which ATAGINFO( ) returns information. If you specify the empty string ("") for cCDXName, ATAGINFO( ) returns the number of tags in all open .cdx files and all open .idx files for the selected table.
nWorkArea
Optional. Specifies the work area containing the table for which ATAGINFO( ) returns information.
cTableAlias
Optional. Specifies the alias of the table for which ATAGINFO( ) returns information. If you omit cTableAlias and nWorkArea the function uses the table in the current workarea.
Return Value
Numeric

_________________
用力 Try 一下...可以發現很多好玩的事....
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 雅虎訊息通 MSN Messenger
bin1x



註冊時間: 2004-08-27
文章: 462


第 4 樓

發表發表於: 星期二 十二月 14, 2004 11:24 am    文章主題: 引言回覆

dbgetprop()應該會有用
不過會查表查半天
如果只是單純的index order
disp status 就可以看了
回頂端
檢視會員個人資料 發送私人訊息 發送電子郵件 參觀發表人的個人網站 MSN Messenger
cathysia



註冊時間: 2004-12-01
文章: 4


第 5 樓

發表發表於: 星期二 十二月 14, 2004 11:57 am    文章主題: 引言回覆

谢谢两位,问题解决了,^_^
回頂端
檢視會員個人資料 發送私人訊息 MSN Messenger
從之前的文章開始顯示:   
發表新主題   回覆主題    VFP 愛用者社區 首頁 -> VFP 討論區 所有的時間均為 台北時間 (GMT + 8 小時)
1頁(共1頁)

 
前往:  
無法 在這個版面發表文章
無法 在這個版面回覆文章
無法 在這個版面編輯文章
無法 在這個版面刪除文章
無法 在這個版面進行投票
無法 在這個版面附加檔案
無法 在這個版面下載檔案


Powered by phpBB © 2001, 2005 phpBB Group
正體中文語系由 phpbb-tw 維護製作