HI again,
to have a n-digit number change the string ls_base to n-digits.
eg.:
4 numbers ls_base = "1234"
7 numbers ls_base = "1234567"
8 numbers ls_base = "12345678"
10 numbers ls_base = "1234567890"
Take kare about the last check after the LOOP if ls_result is of the right length that you do...
Sorry . the better way is to do more loops
string ls_result, ls_ch
int li_rand, li_i
long ll_count
string ls_base = "1234567890"
// make the string longer than 255 characters
FOR li_i = 1 TO 5
ls_base += ls_base
NEXT
// Initialize the random generator
Randomize( cpu() )
ll_count = 0
DO...
Hi,
here is the sulution for your problem.
string ls_result, ls_ch
int li_rand, li_i
long ll_count
string ls_base = "1234567890"
// make the string longer than 255 characters
FOR li_i = 1 TO 5
ls_base += ls_base
NEXT
// Initialize the random generator
Randomize( cpu() )
ll_count = 0
DO...
Hi,
the problem is that from one PBVersion to the next some datawindow properties were added to the datawindowobject. most of them are for PDF-creation and for the web dw capabilities.
here is a sample code for a (external) datawindow this the same colummns in the exported sourse. it is from...
can you give an example of the sql queries you intend to use?
It is not really clear what you want to do.
what do you mean with 'But now i have the problem of totalling their values' ?
here is a more generic function whis can do mor. not just eleiminate some characters but also replace characters for a in string
public function string of_replace (string as_string, string as_token, string as_replace);
string ls_text = ""
long ll_count, ll_n, ll_token, ll_pos, ll_start...
Try this
string ls_run, ls_my_htm_file
ls_my_htm_file = "c:\my_folder\my_file.htm"
ls_run = "explorer.exe " + ls_my_htm_file
// do not forget to insert at least 1 space between explorer.exe and the file_path !!
Run( ls_run)
Hi,
you cannot use a variable inside a string-constant. how could any compiler know how to interprete the code? the compiler (parser) cannot know if you want the content of a variable inside the string or if you want to have the characters inside the string.
use
ls_filter = "Year( some_date )...
HI,
to make a text-field (either a static text or a text database column) make showing up a various length of text make the field autosizeheight. the autosize height property is found on the property tab general or position.
if placing the field in the header, summary or footer, make shure...
As far as I can see in your code
SELECT s_name INTO :inspectionName FROM section WHERE s_id = :index ORDER BY s_name USING sqlca;
this will retrieve only one row.
create a datawindow with the following retrieve:
select "s_name" from "section" where "s_id" = :arg1 order by "s_name"
use the...
Hi,
first you should know that this is a real NOT trivial problem!
But it is solvable in nearly all cases. %-)
you need to consider about these facts...
1. what kind of CSV-file do you have. Are text and numeric values distinguished by a " or ' ?
2. If text values are enclosed by " or ' is...
to do what you like is to create one pipeline appropriate to the columns and tables you wnat to be piped. When running your application to use the pipe vith various datasources you only have to set up the source and destination transactions correctly. this means to use one pipeline against...
Hi,
to get all objects in the datawindow use this
<DW Control Name>.Object.DataWindow.Objects
or
<DW Control Name>.Describe("DataWindow.Objects")
both returns a TAB separated list of all objects.
eg. "emp_name~temp_street~tlabel_emp_name~tlabel_emp_street"
from there on you can extract all...
There are 2 ways to do as far as I know.
1. You can delete all rows which is recomended as you might need the rows later from the deleted buffer. this is when you want to update the deleted rows that they might be deleted in the database too.
DO WHILE dw_1.Rowcount() > 0
dw_1.DeleteRow(1)...
you might have a look at this
http://sourceforge.net/projects/kodigo/
it is a framework for Powerbuilder that might satisfy your needs or you might built a custum visual object as a button-ancaster for others. this ancaster my include all other object types (pictures, text, lines, ovals... even...
mybe you should consider some of these cases:
are you running the app in normal and debugmode on the same machine / user account ? mybe depending on that some registry entries ed. for database settings may differ. and therefor not connecting to the same database?
do you work with the same...
HI,
It sounds curious about your sorting problem. I just tryed it.
I created a datawindow (external) and inserted some rows typing in some rows with characters and '-'. sorting was ok. '-' was sorted before 'a' and before '1' etc.
It seems to be not the '-' (ascii 45) you are retrieving from...
Hi,
I think thereis a mistake in your logic.
1. the file is already opened when you try to execute dw_1.importFile(...)
2. your code would import into dw_1 all rows
try this:
docpath = w_glimport.sle_1.Text
dw_1.import(text!, docpath)
dw_1.SetFilter( "#1 = 'D')
dw_1.Filter()...
Hi,
another posiibility is to parse the datawindow syntax.
string ls_syntax
ls_syntax = dw_xyz.describe( 'datawindow.syntax')
this will give a reaulting string similar like the file you get when you export a datawindow from the library painter.
something like this...
release 8...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.