Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DBGETPROP malfunction?
Message
From
29/01/2017 05:21:53
 
 
To
29/01/2017 05:02:05
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 10
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01647100
Message ID:
01647108
Views:
41
>>Hi,
>>
>>I have troubles with DBGETPROP function to get the caption:
>>
>>
>>CREATE DATABASE test
>>CREATE TABLE testtable (field1 c(10), field2 c(10))
>>DBSETPROP('Testtable','Field','Caption','My Long Caption')
>>? the caption is '+ DBGETPROP('testtable.field2','Field','Caption')
>>
>>
>>errors "command contains unrecognized phrase / keyword" on row 4
>>
>>What is possibly going on here?
>>
>>Regards,
>>Koen
>
>When you create a table, it's not automatically added to the currently open database. You have to use the Add Table command. At least that's how I think it is, I have never used VFP databases myself.

Tore,
The line of code's was C&P from '1002' by Tamar and others, see https://books.google.nl/books?id=-6wGndJSbkcC&pg=PA161&lpg=PA161&dq=dbgetprop+vfp&source=bl&ots=7XL5HHNw59&sig=39iggMHuSPLouF0ruYr96Sh-Jfs&hl=nl&sa=X&ved=0ahUKEwijwcDhjefRAhUrBMAKHfOYDyQQ6AEIYjAH#v=onepage&q=dbgetprop%20vfp&f=false
The error 'Cannot find the object, a.s.o. did not only occur in the example but also in my application where I used a real, exsisting table with a real exsisting field. Would you be able to enlighten me how to make correctly use of DBGETPROP() to find tha caption of a field?
Thanks,
Koen
Previous
Reply
Map
View

Click here to load this message in the networking platform