Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get list of all indexes of table
Message
From
05/06/1998 03:29:27
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00103725
Message ID:
00105048
Views:
24
>>>I need to get list of all indexes which are in CDX file?
>>>and index' expresion and name of them.
>>>How it is possible?
>>>
>>>Giedrius
>Thank you very much.
>Second question:
> How get table's path from database if table's and databases location aren't same?
>Third question:
> How get Referential Integrity rules from database?
>Forth question:
> How get Stored Procedures from Database?
>

>:)
>
>Giedrius
Second :
if !dbc()=cursorgetprop("Database",cMyTable)  && First open dbc
  open database (cursorgetprop("Database",cMyTable))
endif
cPath_Name = dbc()
Third and fourth : AFAIK to get them you could only use dbgetprop() (ie:DBGETPROP(cTableName, "Table", "DeleteTrigger")) to learn what the ri_delete function is and then open dbc as a table (use myDBC.dbc), locate for objectNAme = "StoredProceduresSource" and parse the "code" field (memo field storing all stored procs and ri code) for that procedure section. For just RI there is a shorter access though. Locate for !empty(ricode), ricode is stored in short format as ie: CCR for Cascade,Cascade,Restrict for Update,Delete,Insert respectively. But you should reverse engineer it to find parents via parentid. Now this comes last : You could use home()+"tools\gendbc\gendbc" to generate programmatic creation of dbc and tables and place the stored procs and ri data in a custom object for later usage (better if you use gendbcx it generates them as class code and doesn't have bugs and limitations of gendbc).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform