Daniel, Also consider that MM may be a reserved word under v7.6 syntax vs. v2.11. Also, checkout the options with using RStyle.
Jim Bentley American Celiac Society [email protected] tel: 1-504-737-3293 ________________________________ From: Bill Downall <[email protected]> To: RBASE-L Mailing List <[email protected]> Sent: Wednesday, September 30, 2009 6:15:50 PM Subject: [RBASE-L] - Re: Changing data in one column deletes data in another....... Daniel, First of all, the reason Bernie asked about your version is that you seem to be using syntax from about 1986. I would recommend that you replace your FILLIN command with a DIALOG command, and your old-fashioned operators with their newer equivalents. What datatype is column1? You need to set a variable of the same type to the value collected in your FILLIN or DIALOG. I'm assuming integer for the example below, because that's harder than if it's text. If yours is text, you can skip the vSearchVal stuff and just use "mm". SET VAR mm TEXT SET VAR vSearchVal INTEGER -- skip if columns are text DIALOG 'bal =' mm vEndKey 1 CAPTION 'Enter balance' IF vEndKey = '[esc]' THEN goto lbExit ENDIF IF mm IS NULL THEN goto lbExit ENDIF SET VAR vSearchVal = (int(.mm)) -- don't do this if the columns are text EDIT column1, column2, column3, column4, column5, column6.......etc........ + FROM tablename + WHERE column1 = .vsearchval + OR column2 = .vsearchval + OR column3 = .vsearchval + OR column4 = .vsearchval Do you still get the disappearing data with current syntax? Bill On Wed, Sep 30, 2009 at 6:58 PM, Daniel Lopez <[email protected]> wrote: > >i meant to say > >i really don't have very formal training with the language. i've pretty much >just learned this stuff as i go > > >thanks a bunch >daniel >> > > >On Wed, Sep 30, 2009 at 3:48 PM, Daniel Lopez <[email protected]> >wrote: > >Sorry' let me give you some more background.... >> >>I'm using Rbase 7.6 on new machines running xp. >> >>The columns that follow in the where clause are all currency type but the >>columns i am calling are mixed date, text, currency...ect >> >>like i said before. if i change the command to "edit all from 'table' >>where.....so and so...' then there is no deletion. It is only when i get >>specific with the columns that i have a problem. >> >>>> >> >>i really have very formal training with the language so i may just be making >>a simple mistake but this macro worked before we converted to 7.6. >> >> >>On Wed, Sep 30, 2009 at 3:23 PM, Bernard Lis <[email protected]> wrote: >> >>>>> >>> >>> >>> >>> >>> >>>Hi Daniel, >>>Don't tell me, you are still on version >>>2.11???? >>>if the col's are different type then, how can you >>>use column eq .mm for all col's? >>>Bernie Lis >>>----- Original Message ----- >>>>>>>> >>>> >>>>From: Daniel Lopez >>>>To: RBASE-L Mailing List >>>>Sent: Wednesday, September 30, 2009 5:51 >>>> PM >>>>Subject: [RBASE-L] - Changing data in one >>>> column deletes data in another....... >>>> >>>>Hey gang, >>>> >>>> >>>>I've made my best attempt at this one but any help >>>> will be greatly appreciated. >>>> >>>>What's happening is that when i change >>>> data in one column, the data in another column gets deleted. >>>>I've tried >>>> different configurations of the macro and an "edit all" macro works, (ie >>>> doesn't delete) but there are too many columns >>>> in the table and it is >>>> much more practical to be selective with what columns we edit. >>>> >>>>here is >>>> an example of the macro... >>>>_________________ >>>>clear var mm >>>>set >>>> variable mm currency >>>> >>>>fillin mm using 'bal = ' >>>>edit column1, column2, >>>> column3, column4, column5, column6.......ect........from (table) where >>>> (column1) eq .mm or (column2) EQ .MM or (column3) eq .mm or (column4) eq >>>> .mm >>>>______________________ >>>> >>>>BTW... the column i am changing is a >>>> (date) type and the column being deleted is a (currency) type >>>> >>>>Any >>>> suggestion would be greatly appreciated >>>> >>>> >>>>Regards, >>>>Daniel >>>> >>>> >> >

