Re: fields in a cursor
- From: "HME" <helassaad@xxxxxxxxxxx>
- Date: Fri, 21 Apr 2006 22:44:34 -0400
Jack,
Thank you for your reply, I ended up doing the same thing and got it to
work. I used the iif to check if a field is character or numeric, didn't
think about using transform though. It took me a while to realize that the
different data types were causing the problem.
Thanks again,
HME
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
"Jack Jackson" <jacknospam@xxxxxxxxxxxxxxx> wrote in message
news:nnri42tsdeco9i4v00o98jue1jop9nksgi@xxxxxxxxxx
On Fri, 21 Apr 2006 19:10:22 -0400, "HME" <helassaad@xxxxxxxxxxx>total
wrote:
Bernhard,
I tried those and still getting errors.
This is part of my logic:
Select tempartcondition
** get the count of fields in the cursor
fldcnt=Fcount("tempartcondition")-1 && ignore the last field - it is
namesand not needed for the graph
cgdata=""
For i = 1 To fldcnt
cgdata=cgdata+Field(i,"tempartcondition",0)+CHR(9) && get field
youfrom table or cursor
Next i
cgdata=cgdata+CHR(13)+CHR(10)
FOR i = 1 TO 3
For j = 1 To fldcnt
lcField = "tempartcondition." + field(j)
lxValue = &lcField
cgdata=cgdata+("&lxvalue")+CHR(9) && this is where I tried all
gave me and none worked, some of the fields are numeric and others are
Character
Next j
cgdata=cgdata+CHR(13)+CHR(10)
NEXT i
Thank you,
HME
You need to get the field contents as character datatype, regardless
of the actual data type. TRANSFORM() will do that for you. If you
don't like what it does, or if you need this for a version of VFP that
doesn't have TRANSFORM(), you will need to write your own code that
converts each possible data type to character.
FOR i = 1 TO 3
For j = 1 To fldcnt
cgdata=cgdata+transform(evaluate("tempartcondition." +
field(j)))+CHR(9)
Next j
cgdata=cgdata+CHR(13)+CHR(10)
NEXT i
.
- References:
- fields in a cursor
- From: HME
- Re: fields in a cursor
- From: Bernhard Sander
- Re: fields in a cursor
- From: HME
- Re: fields in a cursor
- From: Jack Jackson
- fields in a cursor
- Prev by Date: Re: fields in a cursor
- Next by Date: BalloonText.
- Previous by thread: Re: fields in a cursor
- Next by thread: Converting from VFP 6 - VFP9
- Index(es):
Relevant Pages
|