Search results

  1. S

    catch all exceptions in .w program

    I need a Generic catch for all exceptions in .w code, and store the Message in a variable, example: DEF VAR err AS CHARACTER. ?? DEF VAR obj AS MEMPTR. PUT-STRING(obj, 0) = "hello". ?? fill "err" variable in this case with = "PUT/GET functions not allowed on uninitialized memory. (2914)"...
  2. S

    catch all exceptions in .p program

    I need a Generic catch for all exceptions in .p code, and store the Message in a variable, example: DEF VAR err AS CHARACTER. ?? DEF VAR obj AS MEMPTR. PUT-STRING(obj, 0) = "hello". ?? fill "err" variable in this case with = "PUT/GET functions not allowed on uninitialized memory. (2914)"...
  3. S

    List Fields

    I am trying to get field names from one table: ex: FOR EACH TableName NO-LOCK: CREATE data-table. data-table.ColumnName = ¿?. END. Table Columns (column1, column2, column3) Thanks
  4. S

    Attribute GET-CGI-VALUE for the PSEUDO-WIDGET has an invalid value of . (4058)

    DEF VAR sPost AS CHARACTER NO-UNDO. sPost = GET-VALUE("WebValue"). **Attribute GET-CGI-VALUE for the PSEUDO-WIDGET has an invalid value of . (4058) "WebValue" contains great quantity of information. How I can solve it? thanks
  5. S

    split function?

    I want to obtain an array of text from a string separated for "/" character. Ex. def var text1 as character. text1 = "/folder1/folder2/file.p". DO v-i = 1 TO NUM-ENTRIES(??): IF NOT Entry(v-i,text1) = '':U THEN DO: DISPLAY Entry(v-i,text1) . END. END. result: folder1 folder2 file.p...
  6. S

    Checks for the existance of a folder

    for files: def var file as char no-undo. def var f as char. file = "helloworld.p". FILE-INFO:FILE-NAME = file. f = FILE-INFO:FULL-PATHNAME. IF f <> ? THEN DO: DISPLAY "Exist". END. ELSE DO: DISPLAY "Not Exist". END. the same for...
  7. S

    Obtain Field Type

    I am trying to obtain the data type (logical, character, etc) from a table and field name stored in a variable. DEFINE VARIABLE columnName AS CHARACTER. columnName = "TableCustomer.ColumnId". DEFINE VARIABLE typeResult AS CHARACTER. ...do Something... DISPLAY typeResult. /* ex. ColumnId...
  8. S

    Sort TEMP-TABLE

    DEF TEMP-TABLE test FIELD caption AS CHARACTER. create test. assign test.caption = "Microsoft". create test. assign test.caption = "Apple". create test. assign test.caption = "Oracle". FOR EACH test no-lock. DISPLAY test.caption. END. it's possible to sort a temp table? output...
  9. S

    write text file

    how can write a text file which content will be the value of a variable? (without using copy-lob) DEF VAR filepath AS CHAR NO-UNDO. DEF VAR content AS CHAR NO-UNDO. filepath = get-field('filepath'). content = get-field('content'). do write...¿? Thanks
  10. S

    WebSpeed Agent Error: Agent did not return an HTML page (6383)

    .w code: {&OUT} "<html><body>Hello World</body></html>" Error Message: WebSpeed error from messenger process (6019) WebSpeed Agent Error: Agent did not return an HTML page (6383) What am I doing wrong? Thanks
  11. S

    read .p code

    Hello, I looking for a way to .p or .w file return another .p file code. example: file1.p code: define variable a as character no-undo. for each <table>: assign a = a + <value> + ','. end. assign a = trim(a,','). i need file2.p receive '/home/test/file1.p' parameter and returns a...
Top