?
Solved

Executing external code

Posted on 2003-03-23
8
Medium Priority
?
242 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
8 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create keystrokes in Netbeans IDE 8.0 for Windows.
Suggested Courses

764 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