Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Append/Add Record in View - Blank key field in table
Message
From
23/07/1999 14:32:14
 
 
To
23/07/1999 14:21:24
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00245336
Message ID:
00245463
Views:
15
Lets just look at this part of the code.

<br>Just to let you know. If you surround your code with a <pre > tag it will preserve the tabbing.<br>
>



>select (tcTableName)
>dime aFlds(1)
>nNoFields = afield(aFlds)
>
>for lnKnt = 1 to nNoFields
> lcFieldName = tcViewName + "." + aFlds(lnKnt,1)
> lcUpdateField = tcTableName + "." + aFlds(lnKnt,1)
> lcFieldType = aFlds(lnKnt,2) + ;
> "(" + alltrim(str(aFlds

It looks like here that the keyfield is not updatable but the rest are.
I thinks you want all of your fields updatable.

(lnKnt,3)) + ")" )
> if aFlds(lnKnt,1) = cIDField
> DBSetProp(lcFieldName, 'Field', 'KeyField', .t.)
> DBSetProp(lcFieldName, 'Field', 'Updatable', .f.)
> else
> DBSetProp(lcFieldName, 'Field', 'KeyField', .f.)
> DBSetProp(lcFieldName, 'Field', 'Updatable', .t.)
> endif
> DBSetProp(lcFieldName, 'Field', 'UpdateName', lcUpdateField)
> DBSetProp(lcFieldName, 'Field', 'DataType', lcFieldType)
>endfor

HTH

Dan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform