Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace fields with blank values
Message
 
 
To
27/07/2000 16:04:56
Cindy Winegarden
Duke University Medical Center
Durham, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00397647
Message ID:
00397850
Views:
12
Hi Cindy,

Thanks for your kind words. Yes, this is a great command. I already implemented it.

Completely unrelated problem: I decided to create a view on the fly. In order to do this firstly I created a view, then I use EView to create a program for this view. Then I modified it a little to use database name+!+tablename as a parameter. This is my program for this view:
********************************************************************
*  Description.......: CreateVNames - create View for Names application
*  Calling Samples...:
*  Parameter List....: pcTable
*  Created by........: Nadya Nosonovsky 07/27/2000 01:41:10 PM
*  Modified by.......:
********************************************************************
lparameters pcTable
wait window nowait "Creating WorkFile for Names..."
***************** Begin View Definition VNAMES ***************
create sql view "VNAMES" ;
     as select recnum, propid, stateuse, ;
     fullname1,  fullname2, buyer1, buyer2, buyerrel, ;
     moditype, moditble,  named, adcnames ;
     from &pcTable ;
     where adcnames = .f. ;
     order by fullname1, fullname2

dbsetprop('VNAMES', 'View', 'UpdateType', 1)
dbsetprop('VNAMES', 'View', 'WhereType', 3)
dbsetprop('VNAMES', 'View', 'FetchMemo', .t.)
dbsetprop('VNAMES', 'View', 'SendUpdates', .t.)
dbsetprop('VNAMES', 'View', 'UseMemoSize', 255)
dbsetprop('VNAMES', 'View', 'FetchSize', 100)
dbsetprop('VNAMES', 'View', 'MaxRecords', -1)
dbsetprop('VNAMES', 'View', 'Tables', pcTable)
dbsetprop('VNAMES', 'View', 'Prepared', .f.)
dbsetprop('VNAMES', 'View', 'CompareMemo', .t.)
dbsetprop('VNAMES', 'View', 'FetchAsNeeded', .t.)
dbsetprop('VNAMES', 'View', 'FetchSize', 100)
dbsetprop('VNAMES', 'View', 'Comment', "")
dbsetprop('VNAMES', 'View', 'BatchUpdateCount', 1)
dbsetprop('VNAMES', 'View', 'ShareConnection', .f.)

*!* Field Level Properties for VNAMES
* Props for the VNAMES.propid field.
dbsetprop('VNAMES.propid', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.propid', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.propid', 'Field', 'UpdateName', pcTable+'.propid')
dbsetprop('VNAMES.propid', 'Field', 'DataType', "I")
* Props for the VNAMES.stateuse field.
dbsetprop('VNAMES.stateuse', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.stateuse', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.stateuse', 'Field', 'UpdateName', pcTable+'.stateuse')
dbsetprop('VNAMES.stateuse', 'Field', 'DataType', "C(3)")
* Props for the VNAMES.fullname1 field.
dbsetprop('VNAMES.fullname1', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.fullname1', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.fullname1', 'Field', 'UpdateName', pcTable+'.fullname1')
dbsetprop('VNAMES.fullname1', 'Field', 'DataType', "C(40)")
* Props for the VNAMES.fullname2 field.
dbsetprop('VNAMES.fullname2', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.fullname2', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.fullname2', 'Field', 'UpdateName', pcTable+'.fullname2')
dbsetprop('VNAMES.fullname2', 'Field', 'DataType', "C(40)")
* Props for the VNAMES.buyer1 field.
dbsetprop('VNAMES.buyer1', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.buyer1', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.buyer1', 'Field', 'UpdateName', pcTable+'.buyer1')
dbsetprop('VNAMES.buyer1', 'Field', 'DataType', "C(25)")
* Props for the VNAMES.buyer2 field.
dbsetprop('VNAMES.buyer2', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.buyer2', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.buyer2', 'Field', 'UpdateName', pcTable+'.buyer2')
dbsetprop('VNAMES.buyer2', 'Field', 'DataType', "C(25)")
* Props for the VNAMES.buyerrel field.
dbsetprop('VNAMES.buyerrel', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.buyerrel', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.buyerrel', 'Field', 'UpdateName', pcTable+'.buyerrel')
dbsetprop('VNAMES.buyerrel', 'Field', 'DataType', "C(1)")
* Props for the VNAMES.recnum field.
dbsetprop('VNAMES.recnum', 'Field', 'KeyField', .t.)
dbsetprop('VNAMES.recnum', 'Field', 'Updatable', .f.)
dbsetprop('VNAMES.recnum', 'Field', 'UpdateName', pcTable+'.recnum')
dbsetprop('VNAMES.recnum', 'Field', 'DataType', "I")

* Props for the VNAMES.moditype field.
dbsetprop('VNAMES.moditype', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.moditype', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.moditype', 'Field', 'UpdateName', pcTable+'.moditype')
dbsetprop('VNAMES.moditype', 'Field', 'DataType', "C(1)")
* Props for the VNAMES.moditble field.
dbsetprop('VNAMES.moditble', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.moditble', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.moditble', 'Field', 'UpdateName', pcTable+'.moditble')
dbsetprop('VNAMES.moditble', 'Field', 'DataType', "C(8)")
* Props for the VNAMES.named field.
dbsetprop('VNAMES.named', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.named', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.named', 'Field', 'UpdateName', pcTable+'.named')
dbsetprop('VNAMES.named', 'Field', 'DataType', "C(1)")
* Props for the VNAMES.adcnames field.
dbsetprop('VNAMES.adcnames', 'Field', 'KeyField', .f.)
dbsetprop('VNAMES.adcnames', 'Field', 'Updatable', .t.)
dbsetprop('VNAMES.adcnames', 'Field', 'UpdateName', pcTable+'.adcnames')
dbsetprop('VNAMES.adcnames', 'Field', 'DataType', "L")
wait clear
Seems fine. But for some unknown reason it doesn't set Tables correctly for the view. I spent time trying to make it work and finally I ended with cursorsetprop('Tables',pcTable). This solved the problem. But I still don't understand why it doesn't work in the program. It's a real mystery for me...


>Hey Nadya,
>
>I remember the first time I used BLANK. I was wandering around at my last job looking for the closest "guru" to help me. After I grabbed her in the hall, she said to look up the BLANK command.
>
>Sure has been useful! I like it because it removes 0's and .F.'s so it's easy to see in the table when .T. or >0 value has been entered. They stick out in the middle of all that empty space.
>
>Wonder what great commands I still haven't discovered!!
>
>
>>Thank you both of you. I knew, it should be this simple :)
>>
>>>Hi Nadya,
>>>
>>>There is a BLANK command in VFP which should do what you want. You can blank an entire record or selected fields.
>>>
>>>Rick
>>>
>>>>Hi everybody,
>>>>
>>>>I'd like to replace couple of fields with blank information. Fields could be different types: character and numeric. Before I start to write my own 'blank' function, I'd like to know, may be there is a VFP command, which allows me to do this?
>>>>
>>>>Thanks in advance.
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform