Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. bernds44

    random number between limits

    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...
  2. bernds44

    random number between limits

    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...
  3. bernds44

    random number between limits

    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...
  4. bernds44

    datawindow conversion from PB8 to PB7

    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...
  5. bernds44

    How to go about this DataWindow problem

    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' ?
  6. bernds44

    eliminating special characters

    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...
  7. bernds44

    Run & IE

    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)
  8. bernds44

    Datawindow (Filter)

    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 )...
  9. bernds44

    Displaying text

    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...
  10. bernds44

    Alphabetical Order.

    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...
  11. bernds44

    How to parse a file using comma delimiters???

    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...
  12. bernds44

    To update a datawindow having multiple table

    Hi, can you post here the source code of your dw and the tabledescription so I can check it in pb?
  13. bernds44

    Change pipeline source dynamic

    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...
  14. bernds44

    controls in a datawindow

    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...
  15. bernds44

    Deleting all rows..

    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)...
  16. bernds44

    &quot;Pretty&quot; buttons

    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...
  17. bernds44

    Invalid Datawindow row/column specified at line xx

    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...
  18. bernds44

    SQL Vs PB - with more info

    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...
  19. bernds44

    importing a data to the data window

    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()...
  20. bernds44

    Sort Data Using Arrow keys

    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...

Part and Inventory Search

Back
Top