Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #10613

Re: Help on saving an array element to table

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From "Jose F Zouain" <jfzouain@zetaconcepts.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Help on saving an array element to table
Date 28 May 2017 00:54:04 GMT
Lines 67
Message-ID <eouldcFoj1jU1@mid.individual.net> (permalink)
References <eorv1vF5phcU1@mid.individual.net> <17388e2a-c82a-4d20-bf53-8afffcc994f5@googlegroups.com>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
X-Trace individual.net vxJGgviKtyPO134lHFydHAPQ4tJJvLWAh1KepnlKtfNzahmzWP
Cancel-Lock sha1:SHaGrNigQHDqXufSerGs6yHfV/4=
User-Agent XanaNews/1.18.1.5
Xref csiph.com comp.lang.clipper.visual-objects:10613

Show key headers only | View raw


Hi Guys

Thanks all for responding.

I am using a combo box with Fillusing, at the screen display is working
good, we load the first element of the array and user selects it.
The problem is saving it to the table.

Already have in memory the element selected, let's say Sales Order.
Now want to save in column "SO", a character(2) column  

Phil
Thanks don't want to use Memo field, is already a character (2) column.

Franz
n := AScan(aTranscod, {|aVal| aVal[1] == "Sales Order"})
This code is working, no compling error
Returns n==0
So when saving it crashes


Steve
This search I did is incorrect 
n := AScan(aTranscod, SELF:oDCTRANSCOD:TextValue)
Have to search for first element in the array and save the correspoding
2nd element.

Steve
When I compile this, gives me an error:  Bad function call 51138
n := ascan(aTranscod,{|aTranscod|aTranscod[1] =
SELF:oDCTRANSCOD:TextValue})

I just replaced = SELF:oDCTRANSCOD:TextValue}) with = Sales Order})
and it worked because I selected Sales Order from the Combo Box.
Now I know where the problem is at SELF:oDCTRANSCOD:TextValue

But when I displayed it at the screen is correct:
SELF:oDCTRANSCOD:TextValue == "Sales Order"

Johan
Thanks, but I have the same error as above -> Bad function call 51138
But for testing it will not crash, because of this:
IF n > 0
  SELF:oDBServer:FIELDPUT(#TRANSCOD, aTranscod[n,2])
ENDIF
=============================

I just did a workaround don't know if is correct, but is working now
replaced the SELF:oDCTRANSCOD:TextValue like this

LOCAL sValue AS STRING
sValue := SELF:oDCTRANSCOD:TextValue
n := AScan(aTranscod,{|aTranscod|aTranscod[1] == sValue})

and is saving it OK, looks like the ascan doesn't like to compare with
SLE value

Thanks all for your help, this why I have not left VO, because of the
help you all guys provides here.

Please let  me know if this OK, what I did.

Best regards

Jose
-- 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Help on saving an array element to table "Jose F Zouain" <jfzouain@zetaconcepts.com> - 2017-05-27 00:20 +0000
  Re: Help on saving an array element to table Sherlock <sherlock@sherlock.com.au> - 2017-05-27 00:07 -0700
    Re: Help on saving an array element to table Sherlock <sherlock@sherlock.com.au> - 2017-05-27 02:37 -0700
      Re: Help on saving an array element to table "Karl-Heinz" <invalid@invalid.invalid> - 2017-05-27 12:10 +0200
  Re: Help on saving an array element to table Franz Rachbauer <office@rachbauer.org> - 2017-05-27 09:28 +0200
  Re: Help on saving an array element to table Steve <steven_emmett@yahoo.co.uk> - 2017-05-27 00:36 -0700
  Re: Help on saving an array element to table Steve <steven_emmett@yahoo.co.uk> - 2017-05-27 00:53 -0700
    Re: Help on saving an array element to table "Jose F Zouain" <jfzouain@zetaconcepts.com> - 2017-05-28 00:54 +0000
      Re: Help on saving an array element to table JohnMartens <martens@tennishulp.info> - 2017-05-28 08:31 +0200
      Re: Help on saving an array element to table Mathias <mathias.hakansson@consultec.se> - 2017-05-30 00:28 -0700
        Re: Help on saving an array element to table "Jose F Zouain" <jfzouain@zetaconcepts.com> - 2017-05-31 11:42 +0000
  Re: Help on saving an array element to table [OT] "Karl-Heinz" <invalid@invalid.invalid> - 2017-05-28 09:59 +0200

csiph-web