Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Executing external code

Posted on 2003-03-23
8
Medium Priority
?
245 Views
Last Modified: 2013-12-26
I stored a formula such as 'll_count = al_rows * al_cols' into database register.

Is it possible to execute the formula like if it was written into source code?
0
Comment
Question by:tpadilha
  • 2
  • 2
5 Comments
 
LVL 2

Expert Comment

by:SylvainPouliot
ID: 8192023
You could use a datawindow computed column or the evaluate function.

Of course...ll_count = al_rows * al_cols'
won't work "as is" but if you take this expression, replace "al_rows" with the value you want (or the name of a column in your datawindow)  and do the same for "al_cols" then your computed_column will give you the result...


This solution has some limitations regardless the type of expression you want to use, but it might help you..

Bye!
0
 
LVL 5

Accepted Solution

by:
berXpert earned 140 total points
ID: 8204167
You cannot execute external PB script because it's precompiled on the PBD but you can run VBScript in text.

Sample:

OleObject wsh
Integer  li_rc

wsh = CREATE OleObject
li_rc = wsh.ConnectToNewObject( "MSScriptControl.ScriptControl" )
wsh.language = "vbscript"
wsh.addcode("function retfnc(s)  retfnc=s  end function")
wsh.executestatement ('if 1 > 1 then msgbox retfnc("true") else  msgbox retfnc("false") end if')

0
 
LVL 5

Expert Comment

by:buasuwan
ID: 8209407
you can build dynamic script in runtime.
just use PBORCA API, there is a function for importing any object to your library. and call it in runtime.

if you need an sample code, please let me know.
0
 
LVL 2

Expert Comment

by:SylvainPouliot
ID: 8210366
I'd like to see that...
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Programmer's Notepad is, one of the best free text editing tools available, simply because the developers appear to have second-guessed every weird problem or issue a programmer is likely to run into. One of these problems is selecting and deleti…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
Suggested Courses

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question