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


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

Re: Help on saving an array element to table

From JohnMartens <martens@tennishulp.info>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Help on saving an array element to table
Date 2017-05-28 08:31 +0200
Organization A noiseless patient Spider
Message-ID <ogdql1$u6k$1@dont-email.me> (permalink)
References <eorv1vF5phcU1@mid.individual.net> <17388e2a-c82a-4d20-bf53-8afffcc994f5@googlegroups.com> <eouldcFoj1jU1@mid.individual.net>

Show all headers | View raw


When using a 2 dim array to fill the combo see the difference between
SELF:oDCTRANSCOD:TextValue
SELF:oDCTRANSCOD:Value

John


Op 28-5-2017 om 02:54 schreef Jose F Zouain:
> 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