General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only