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


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

Re: Calculate a Expression using AdoServer and MCompile()

From "Willie Moore" <williem@wmconsulting.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Calculate a Expression using AdoServer and MCompile()
Date 2011-09-21 07:29 -0500
Organization Aioe.org NNTP Server
Message-ID <j5clbn$gq$1@speranza.aioe.org> (permalink)
References <9b587df4-12b9-4eba-944c-47e561ebeb99@z7g2000vbp.googlegroups.com>

Show all headers | View raw


Paulo,

What are you trying to achieve? With ADOServer you can do the sums in the 
SQL instead of writing a function to do it. If you are trying to create a 
dynamic expressions and then sum the fields you can parse the expression and 
then do the math. I do this in javascript to keep round trips to the server 
at a minimum.

Regards,
Willie

"Paulo Oliveira"  wrote in message 
news:9b587df4-12b9-4eba-944c-47e561ebeb99@z7g2000vbp.googlegroups.com...

Hi all,

Any help would be very grateful because I'm in a dead end.
What is the best way to do a function like this:

FUNCTION CalcExpressao(cExpressao,oAdoServerCTB)
//cExpressao is FTOTDOC+FTOTPORTES+FTOTEMB
RETURN oAdoServerCTB:FIELDGET(#FTOTDOC)
+oAdoServerCTB:FIELDGET(#FTOTPORTES)+oAdoServerCTB:FIELDGET(#FTOTEMB)

Using MCompile() and MExec() ?
Another approach?

TIA
Paulo Oliveira 

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


Thread

Calculate a Expression using AdoServer and MCompile() Paulo Oliveira <paulo@clipinfor.com> - 2011-09-21 04:23 -0700
  Re: Calculate a Expression using AdoServer and MCompile() "Willie Moore" <williem@wmconsulting.com> - 2011-09-21 07:29 -0500

csiph-web