Search results

  1. D

    How to count how many tables in a DB?

    I think the dump process excludes _hidden tables (SYS tables & metaschema tables)
  2. D

    Display the table record dyanamically

    I don't know if there's a way to display the table as easily as with a "static" buffer, but you can loop on each field and display its value (with NUM-FIELDS / BUFFER-FIELD(i):BUFFER-VALUE). EDIT : and I think you could avoid lots of GET-CURRENT in your example by replacing your REPEAT loop by...
  3. D

    How to get the extent of field name

    _field._extent ...
  4. D

    Checks for the existance of a folder

    Hi, It works for directories too. And you can know whether that's a file or a folder with http://www.progresstalk.com/showthread.php?t=114488 :)
  5. D

    How to get the extent of field name

    Hi, You can also test the value of _EXTENT (available on _FIELD). EDIT : I also think that you can find all that you need inside _FIELD (_DATA-TYPE, _FORMAT, _WIDTH, ...)
  6. D

    appbuilder vs eclipse

    I tried a limited version for 30 days, when the 10.1B was released. It was quite interesting to get syntax highlighting, completion and debugging. But I do not develop via appbuilder, so maybe those features are'nt new to you. Debugging was also made quite easier. And maybe the fact of using...
  7. D

    How to get the field-name's value automatically!

    You may achieve this with the use of dynamic buffer & query : DEF INPUT PARAMETER mytable AS CHAR NO-UNDO. OUTPUT TO VALUE(mytable + ".sql"). DEF VAR bh AS HANDLE NO-UNDO. DEF VAR qh AS HANDLE NO-UNDO. DEF VAR lstChp AS CHAR NO-UNDO. DEF VAR cpt AS INT NO-UNDO. CREATE BUFFER bh FOR TABLE...
  8. D

    FOR EACH with EXCLUSIVE-LOCK means TABLE locking???

    Hi, What about using a query, with "EXCLUSIVE-LOCK" on your GET FIRST / GET NEXT ? This may work the same way as your FOR EACH, but with the possibility of making your transaction smaller. Won't it return you always the same record ?
  9. D

    Obtain Field Type

    :lol: Thanks ! However I'm sure it is far slower than querying _file and _file.
  10. D

    Obtain Field Type

    What kind of object is TableCustomer ? A physical table ? A Temp-Table ?
  11. D

    Obtain Field Type

    You can achieve it through BUFFER-FIELD attributes : DEFINE VARIABLE columnName AS CHARACTER. DEFINE VAR bh AS WIDGET-HANDLE. DEFINE VARIABLE typeResult AS CHARACTER. columnName = "myTable.myField". CREATE BUFFER bh FOR TABLE ENTRY(1, columnName, "."). typeResult = bh:BUFFER-FIELD(ENTRY(2...
  12. D

    Checking variable for A-Z

    Did you try your idea of checking that each character is between "a" and "z" ? I seems to be correct, but it may not be the most efficient in response time... FUNCTION is_A_Z RETURNS LOGICAL (INPUT VarCh AS CHAR) : DEF VAR tmp AS CHAR NO-UNDO. DEF VAR cpt AS INTEGER NO-UNDO. DO cpt =...
  13. D

    Field "_tbl-type" of _file

    Hi, Does anyone know what do "S", "V" and "T" values of this field stand for ? It isn't even mentioned in the documentation... Thanks in advance. Julien EDIT : Could it stand for "table", "systable" and "view" ?
  14. D

    Sql statement to return all tables in a Database in progress

    I'd like to add to Thomas' post the fact that I had to deal with ROWID on the right side of the join (Java / JDBC) : SELECT * FROM pub.\"_field\" WHERE \"_file-recid\" = (SELECT ROWID FROM pub.\"_file\" WHERE \"_file-name\" = YourTableName)
  15. D

    EACH in a FOR EACH clarification

    Here you could use the OF statement FOR EACH table1 NO-LOCK WHERE table1.col1 = "hello", EACH table2 OF table1: /* blah. */ END.
  16. D

    EACH in a FOR EACH clarification

    If both your tables have the same field as primary key, Progress will be able to link them when you use the "EACH ... OF" statement. Ex : Customer table - CustomerNumber - CustomerName - CustomerAge - ... Order table - CustomerNumber - OderNumber - OrderAmount - ... Then Progress will link...
  17. D

    EACH in a FOR EACH clarification

    I don't think so, as there's no link between both your tables. So you'll have x rows from your first table, and your whole second table. EDIT : and be careful, your FOR EACH will loop Number_of_rows_from_table 1 x Number_of_rows_from_table 2. I don't know the English word, but in French that's...
  18. D

    EACH in a FOR EACH clarification

    That's equivalent to "SELECT * FROM table 1, table2". Indeed it isn't much interesting in most case without a join between both tables, something like "SELECT * FROM table1, table2 WHERE table1.field1 = table2.field2". In 4GL, you can do this with FOR EACH table1 NO-LOCK, EACH table2 OF...
  19. D

    Display "Hello world" using class?

    Oops, my mistake :rolleyes: The right statement is myClass = NEW sample(). Sorry for that
  20. D

    Display "Hello world" using class?

    Hi, In order to display the message, your method "mess" needs to be called. When you run your class, the constructor is called. In your example, there's no declared constructor, so your class is just instanciated and destroyed. You need to : - either define a constructor which will call the...
Top