Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Table Structure - Field Comments
Message
From
28/12/2000 14:27:01
 
 
To
28/12/2000 13:18:42
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00457435
Message ID:
00457517
Views:
27
Hi John,

I believe that Trey's response might be easier for me if I can resolve the cursorgetprop and dbgetprop commands not having used them before.
I don't have any trouble "copying" a data field into Excel. I just don't know how to access the fields in the .dbc.

Example:

USE n:\dmdbadb\lf_can.dbf SHARED
set database to (cursorgetprop("tmain.dbc"))

I get an "incorrect property name" error on: set database to (cursorgetprop("tmain.dbc")) - with or without the ".dbc"

If I could get that to work maybe I could skip the "copy stru extend" and do something like:


Close Data all
USE n:\dmdbadb\lf_can.dbf SHARED
set database to (cursorgetprop("tmain.dbc"))
*
oExcel = CreateObject("Excel.Application")
oExcel.Visible = .T.
oExcel.SheetsInNewWorkBook = 1
oWorkBook = oExcel.WorkBooks.Add()
oWorkBook.Windows[1].Activate()
oRange = oExcel.ActiveSheet.Range("A1:B30")
*
SCAN WHILE NOT EOF()
WITH oRange
.Columns[1].Value = Field1
.Columns[2].Value = dbgetprop("tmain."+allt(field_name), "field","comment")
ENDWITH
oRange = oRange.Offset(1,0)
ENDSCAN
*
USE

That would be a big help. the key is the cursorgetprop and the dbgetprop commands. Any help would be appreciated. TIA.

Regards,

Paige
Previous
Reply
Map
View

Click here to load this message in the networking platform