Search results

  1. F

    URGENT: Need something like Break By

    yes it will cause a conflict and you have to be careful with the limit of the char variable. Using a Temp-Table would be safer. DEF TEMP-TABLE ttCheck FIELD f AS CHAR. FOR EACH myTable NO-LOCK: IF CAN-FIND (ttCheck WHERE ttCheck.f = myTable.myField NO-LOCK) THEN NEXT. CREATE...
  2. F

    Urgent Please Help

    To get the result he wants the query should be: myQH:QUERY-PREPARE("FOR EACH pt_mstr WHERE pt_part = 'xx01' AND " + l + " = '" + k + "' NO-LOCK").
  3. F

    Checking the authorisation before a Windows or Dialog starts.

    You can stop it by doing a RETURN in the definition of the program ,it will prevent the creation of widgets and stop it before it can create anything. If your using create-object or another procedure to start your window then check the handle to make sure it passed the validation before doing...
  4. F

    Trying to extract substring from file

    EXPORT SUBSTRING(tt_record,175,16) FORMAT "X(16)".
  5. F

    Catch errors in webspeed page

    Your NO-ERROR applies to the RUN statement , but not the statements in your .p file . If it can't find the program to run then your ERROR-STATUS:ERROR will be true but not if a error comes up inside the called program.
  6. F

    &IF Question.

    Then just put the first field of your primary key in the ELSE field . The it will use the sort it would have used anyway. It either that or you do a full dynamic query (wich use the QUERY AND BUFFER objects instead of a simple FOR EACH ) wich is more complicated. The &IF clause is...
  7. F

    &IF Question.

    Check my example , it actually does a Order By. You only need to specify th e normal sort field in the ELSE part.
  8. F

    &IF Question.

    You can do it with a normal IF . def var siteval as logical. update siteval. For each in_mstr no-lock BY IF siteval THEN in_site ELSE <normal sort field>: display in_part. end.
  9. F

    Error while connecting application server from open java client.

    Is your Application Server on the same machine or on another machine? Is the name of you Application Server testApp or asbroker1? The message says that it can't find your App Server so your problem is probably one of the 3 here: 1) Your appserver is on another machine so the address...
  10. F

    trouble calling activex method

    pad1 is the handle to your control frame. Progress will have created the handle chPad1 that points to your ocx. The correct call will be chPad1:<OCX Name>:OpenConnection(0). OR chPad1:ITEM(1):OpenConnection(0).
  11. F

    Passing Dynamic Temp-table

    You can even do it without using a temp-table. DEF INPUT PARAMETER pcTableName AS CHAR. DEF INPUT PARAMETER pcDbSrcName AS CHAR. DEF INPUT PARAMETER pcDbDestName AS CHAR. DEF VAR hQuery AS HANDLE. DEF VAR hBufSrc AS HANDLE. DEF VAR hBufDest AS HANDLE. CREATE BUFFER hBufSrc FOR TABLE...
  12. F

    Passing Dynamic Temp-table

    Here is a version where x.p copies the data back to the target DB. Program x.p DEF VAR hTable AS HANDLE. DEF VAR hQuery AS HANDLE. DEF VAR hBufferDest AS HANDLE. DEF VAR cTableName AS CHAR INIT "TableName". DEF VAR srcDB AS CHAR INIT "db1". DEF VAR targetDB AS CHAR INIT "db2". RUN x2.p...
  13. F

    Passing Dynamic Temp-table

    Program x.p DEF VAR hTable AS HANDLE. RUN x2.p ("Table Name", OUTPUT TABLE-HANDLE hTable). Program x2.p DEF INPUT PARAMETER pcTableName AS CHAR. DEFINE OUTPUT PARAMETER TABLE-HANDLE ttHandle. DEF VAR hQuery AS HANDLE. DEF VAR hBufDest AS HANDLE. DEF VAR hBufSource AS HANDLE. CREATE...
  14. F

    Returning items from Command line?

    It should , any command line utility or application in Windows can be redirected to a text file. dir *.* > text.txt grep something > res.txt
  15. F

    Returning items from Command line?

    You can always pipe the grep command to a text file then read the text file in progress with input from.
  16. F

    new to dll calls

    If your signature is ok , here is what i think the call should be but i can't be sure since i don't know your dll procedure signature. DEFINE VAR ipdwMajor AS INTEGER INITIAL 0 NO-UNDO. DEFINE VAR ipdwMinor AS INTEGER INITIAL 0 NO-UNDO. DEFINE VAR cpszValidUntil AS MEMPTR NO-UNDO. DEFINE VAR...
  17. F

    SmartObjects question?

    SmartObjects are part of the ADM or ADM2 Framework. They aren't useful unless you plan on using one of those Frameworks . They have extra code that permit you to link them directly to the DB and let them do part of the work. If you want to learn about it , then you should read the book...
  18. F

    Problem of MEMPTR returned by DLL

    It probably your CHAR variable that hits it maximum number of character. A CHAR variable is not big enough to hold 65000 chars.
  19. F

    Can anyone see if this code can be any quicker

    If you print the code and put the page upside down then it will reverse and import the data. :lol: Seriously , just look at the code given and instead of assigning the value , just read it and store it in your database. It doesnt get simpler then that. cRange = "A" + cColumn...
  20. F

    Can anyone see if this code can be any quicker

    Here a way where you are sure that it wont crash DEFINE STREAM stOrd. OUTPUT STREAM stOrd TO c:\Caroline.csv. FOR EACH ordstat WHERE ordstat.kord-date >= 02/01/07 AND ordstat.kord-date <= 03/01/07 NO-LOCK, EACH ordline OF ordstatus NO-LOCK, FIRST ovar WHERE ovar.kvseqnum...
Back
Top