Did yoou make sure to have no space around the ="
SET QUOTES=""""
You also have to recodelock after the change. Make sure to delete the
APX before codelocking so the new code really does come at the top of
the file.
Dennis McGrath
--- Dan <[EMAIL PROTECTED]> wrote:
>
> Ben,
> Thank you for your efforts here, I see what you are after, and
> agree it
> is much cleaner coding. I will spend some time next week trying to
> redo the
> aplication in this way.
> As a side note, and just for grins (not that I agree that codelock
> should need it) I added the set quotes = """", nothing is different.
> Also, now that I have renamed the .app file from .eep to .app,
> trace
> does go through to the next few applications, so this one is working.
> (Thanks Javier for that tip)
> All in all, though I am not fixed yet, I am haveing a great
> learning
> experience, and see that others too have gained from this thread.
> Thanks to
> all who participated. I will announce what I have found if and when I
> do
> squash this bug.
>
> Dan
>
>
> At 08:48 AM 2/21/2003 -0800, you wrote:
> >
> >Dan,
> >
> >I was looking at your file and realized there was a lot of
> repetition.
> >To make things easier to debug and maintain, you might try
> >something like what follows. Since the only thing that changes are
> >the variables that act as parameters you can reduce the
> >opportunity for error. Speaking of errors, this is entirely untested
>
> ><g> and you could extend it's functionality a bit further. Variables
> I
> >added are prefixed with "z"
> >
> >Ben Petersen
> >
> >
> >SET V ijob# = ""
> >SET V ijobid = 0
> >SET V icust# = ""
> >
> >-- Choose elements
> >SET V zChsText = ("company & f_name & l_name &
> >badr & badrst")
> >SET V zChsReturn = ("custNo")
> >SET V zChsTable = ("arMain")
> >SET V zWhere = ("company CONTAINS .icompany")
> >SET V zTitle = ("Choose a Company")
> >SET V zLines = ("10")
> >SET v zFormatted = ("Formatted") -- otherwise =
> >null
> >
> >-- If & Messages
> >SET v zmsgFail = ("Sorry, That company name
> >isn't found in the ARMain table.")
> >
> >SET v zCountTab = ("JobSite")
> >SET V zCountCol = ("JobID")
> >SET V zCountWhe = ("custno = .icust#")
> >SET V zResultVar = ("TotalJobBids")
> >SET V zmsgMult = +
> >("Found based on Company Name,+
> > but has multiple Jobsites please +
> > press 'Other Jobsites' for list")
> >
> >SET V zmsgSucceed = ("Found based on Company
> >Name.")
> >
> >-- Chs-Msg.cmd
> >Set v zChs = +
> >("CHOOSE icust# FROM #VALUES"&+
> > "FOR ("+.zChsText+"),"&.zChsReturn&+
> > "FROM"&.zChsTable&+
> >"WHERE"&.zWhere&"TITLE"&.zTitle&"LINES"&.zLines&.
> >zFORMATTED)
> >
> >&zChs
> >
> >IF verr <> 0 THEN
> > SET V imessage = .zmsgFail
> > RUN varclear IN inform2.apx
> >ELSE
> > Set v zSelCount = +
> > ("SELECT COUNT ("+.zCountCol+") INTO"&+
> > .zResultVar&+
> > "FROM"&.zCountTab&+
> > "WHERE"&.zCountWhe)
> >
> > &zSelCount
> >
> > IF .zResultVar > 1 THEN
> > SET V ijobid = 0
> > SET V imessage = .zmsgMult
> > RUN setvar IN inform2.apx
> > ELSE
> > SET V ijobid = jobid FROM jobsite
> > WHERE custno = .icust#
> > SET V imessage = .zMsgSucceed
> > RUN setvar IN inform2.apx
> > ENDIF
> >ENDIF
> >
>
>----------------------------------------------------------------------------
> >
> >
> >On 21 Feb 2003, at 10:05, Dan Champion wrote:
> >
> >>
> >> Ok,
> >> Here is the ASCII version of the code.Is there a maximum number
> of
> >> variables that can be in use at any given time? By the time this
> form
> >> is called (this is a variable form only,) There are probably
> nearly
> >> 250 variables that are in use.
> >>
> >>
> >> $COMMAND
> >> inform2
> >> SET ERROR MESSAGES OFF
> >> CLEAR V i*
> >> SET V imessage = +
> >> "You may search based on any known information. Just click +
> >> on the field you do have information about and fill it in. Then
> hit
> >> enter. + You only need to fill in one field"
> >> -- form variables
> >> SET V vprint TEXT = ""
> >> -- armain variables
> >> SET V icompany TEXT
> >> SET V inam1 TEXT
> >> SET V inam2 TEXT
> >> SET V iaddress1 TEXT
> >> SET V iaddress2 TEXT
> >> SET V icity TEXT
> >> SET V izcode TEXT
> >> SET V iphon1 TEXT
> >> SET V iphon2 TEXT
> >> SET V iphon3 TEXT
> >> SET V iphon4 TEXT
> >> SET V iphon5 TEXT
> >> SET V icust# TEXT
> >> SET V icurr_bal CURRENCY
> >> SET V ibuilder TEXT
> >> -- jobsite variables
> >> SET V tjobid INTEGER = 0
> >> SET V ijcompany TEXT
> >> SET V ijnam1 TEXT
> >> SET V ijnam2 TEXT
> >>
> >> SET V ijobadd1 TEXT
> >> SET V ijobadd2 TEXT
> >> SET V ijobadd3 TEXT
> >> SET V iphon TEXT
> >> SET V ijobid INTEGER = 0
> >> SET V ijobnotes TEXT
> >> SET V ijobmap TEXT
> >> SET V totaljobids INTEGER = 0
> >> -- joblist variables
> >> SET V ijbnam1 TEXT
> >> SET V ijbnam2 TEXT
> >> SET V ijbladd1 TEXT
> >> SET V ijbladd2 TEXT
> >> SET V ijblphon TEXT
> >> SET V ijbldr TEXT
> >> SET V ijob# TEXT
> >> SET V njob TEXT
> >> SET V totaljobs INTEGER = 0
> >> SET V imessage TEXT
> >> SET ERROR V verr
> >> ENTER USING informer2
> >>
> >> RETURN
> >>
> >> $COMMAND
> >> company
> >> SET V ijob# = ""
> >> SET V ijobid = 0
> >> SET V icust# = ""
> >> CHOOSE icust# FROM #VALUES +
> >> FOR (company & f_name & l_name & badr & badrst), custno FROM
> armain
> >> + WHERE company CONTAINS .icompany TITLE "Choose a Company"
> LINES
> >> 10 FORMATTED IF verr <> 0 THEN
> >> SET V imessage = +
> >> "Sorry, That company name isn't found in the ARMain table."
> RUN
> >> varclear IN inform2.apx
> >> ELSE
> >> SELECT COUNT (jobid) INTO totaljobids FROM jobsite +
> >> WHERE custno = .icust#
> >> IF totaljobids > 1 THEN
> >> SET V ijobid = 0
> >> SET V imessage = "Found based on Company Name, but has
>
=== message truncated ===