home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1993 #2 / Image.iso / database / p4w_all.zip / TI1439.ASC < prev    next >
Text File  |  1993-05-07  |  15KB  |  529 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  9.   VERSION  :  1.0
  10.        OS  :  WIN
  11.      DATE  :  May 7, 1993                              PAGE  :  1/8
  12.  
  13.     TITLE  :  Answers to Common Questions About DDE and OLE
  14.  
  15.  
  16.  
  17.  
  18.   This document will provide answers to common questions about 1)
  19.   Using Paradox for Windows as a DDE Client, 2) Using Paradox for
  20.   Windows as a DDE Server, and 3) Using Paradox for Windows as an
  21.   OLE Client/Server.  For an introduction on DDE and OLE, refer to
  22.   Technical Information Sheet #1438.
  23.  
  24.   Using Paradox for Windows as a DDE Client
  25.  
  26.       Q.  How can I use Paradox for Windows as a DDE Client
  27.           application?
  28.  
  29.       A.  You can use Alphanumeric fields in Paradox tables and
  30.           Character fields in dBASE tables as a repository to store
  31.           links of other DDE server applications.  The fields
  32.           display DDE strings showing the application name, file
  33.           name, and the place reference; better known as
  34.           Application | Topic | Item.  You can also Paste Link into
  35.           Query Forms to search for Table data matching data in the
  36.           open DDE channel.
  37.  
  38.  
  39.       Q.  How do I view the data Paste Linked into a Table?
  40.  
  41.       A.  Make sure that you are not in field view.  Press
  42.           [Shift+F2] to launch the Server application from a Table
  43.           window.
  44.  
  45.  
  46.       Q.  Why can't I Paste Link into a form?
  47.  
  48.       A.  Paste Link works only in Table window Alphanumeric fields
  49.           and in Query Forms.
  50.  
  51.  
  52.       Q.  Why do I get the message "Link information will not fit
  53.           in field" when I Paste Link?
  54.  
  55.       A.  The field must be large enough to contain the Server
  56.           (Application) name, the document (Topic) name including
  57.           the complete path to it from the root, the reference
  58.           (Item) name, and an additional nine characters.
  59.    
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  75.   VERSION  :  1.0
  76.        OS  :  WIN
  77.      DATE  :  May 7, 1993                              PAGE  :  2/8
  78.  
  79.     TITLE  :  Answers to Common Questions About DDE and OLE
  80.  
  81.  
  82.  
  83.  
  84.       Q.  Why do I get the message "Only one DDE link allowed" when
  85.           running a query?
  86.  
  87.       A.  You may Paste Link only once into a Query Form.
  88.  
  89.  
  90.       Q.  Why do I get the message "Unable to launch" when pressing
  91.           [Shift+F2]?
  92.  
  93.       A.  The server may not be in the DOS PATH.
  94.  
  95.  
  96.       Q.  What kind of DDE transactions can Paradox for Windows
  97.           make with other applications using ObjectPAL?
  98.  
  99.       A.  Paradox for Windows can make asynchronous transactions.
  100.           This might require you to put in sleeps to wait for the
  101.           server to respond to certain requests.
  102.  
  103.  
  104.       Q.  Can other applications "Poke" data into Paradox for
  105.           Windows?
  106.  
  107.       A.  The Table is the only Paradox for Windows window that has
  108.           DDE functionality.  Because of performance constraints,
  109.           no mechanism was built to allow users to DDE "Poke".
  110.           Also, because Paradox for Windows has no macro language,
  111.           you cannot use DDE to force changes.
  112.  
  113.  
  114.       Q.  Can other applications send commands to Paradox for
  115.           Windows through DDE?
  116.  
  117.       A.  In order to control an application through DDE, the
  118.           controlled application must contain a predefined set of
  119.           macro commands that it can respond to.  Paradox for
  120.           Windows uses only ObjectPAL to automatically control
  121.           itself.  When executed, ObjectPAL is compiled into
  122.           another Paradox for Windows application that can only be
  123.           controlled by external events such as user input.  It is
  124.           not a macro language that can be sent through a DDE
  125.           channel.
  126.    
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  141.   VERSION  :  1.0
  142.        OS  :  WIN
  143.      DATE  :  May 7, 1993                              PAGE  :  3/8
  144.  
  145.     TITLE  :  Answers to Common Questions About DDE and OLE
  146.  
  147.  
  148.  
  149.  
  150.   Using Paradox for Windows as a DDE Server
  151.  
  152.       Q.  How can I use Paradox for Windows as a DDE Server
  153.           application?
  154.  
  155.       A.  You can copy data from a Table window only.  It can be
  156.           from either one field in one record or it can be the
  157.           entire Table.  It can be from any field type and must not
  158.           be in field or memo view.  Also, you can use ObjectPAL to
  159.           "Poke" data into or to send commands to other DDE Client
  160.           applications.
  161.  
  162.  
  163.       Q.  Why does the data from a memo field appear as <BLOB Memo>
  164.           when I Paste Link into another application?
  165.  
  166.       A.  This is how a Binary Large OBject appears to the
  167.           Clipboard as text.  You would Paste Link as a Bitmap to
  168.           see the format you expect.  Your Client applications'
  169.           Help system should give you information about this.
  170.  
  171.  
  172.       Q.  How can I copy more than one line of a memo field so that
  173.           it can be Paste Linked into another application?
  174.  
  175.       A.  Make sure that you are not in memo view.  Resize the row
  176.           height to give the maximum view in that record. Choose
  177.           Edit | Copy.  You can copy only what is displayed.  This
  178.           would be Paste Linked as a Graphic into the Client
  179.           application.  Refer to your Client applications' Help
  180.           system for information about this.
  181.  
  182.  
  183.       Q.  How can I establish a Cold Link, or a Warm Link?
  184.  
  185.       A.  By default, Windows establishes a Hot Link (Automatic
  186.           Updates) when Paste Linking into applications.  The
  187.           Client application (the target) usually controls the
  188.           Updates.  Some Clients allow you to change a Link so that
  189.           you can only Manually do an Update, making it a Cold
  190.           Link.  Paradox for Windows also allows for this control
  191.           as the Server with the Notify On -  Table window menu
  192.           selection.  When you un-check it, the Clients' requests
  193.  
  194.  
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.  
  206.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  207.   VERSION  :  1.0
  208.        OS  :  WIN
  209.      DATE  :  May 7, 1993                              PAGE  :  4/8
  210.  
  211.     TITLE  :  Answers to Common Questions About DDE and OLE
  212.  
  213.  
  214.  
  215.  
  216.           for an Update are ignored until Notify On is again
  217.           checked, also making it a Cold Link.  As a Server,
  218.           Paradox for Windows does not support the Warm Link
  219.           function.  In a Warm Link, the Server sends a message
  220.           asking the user in the Client if they want an Update.
  221.           You may have difficulty finding any application that
  222.           supports this.
  223.  
  224.  
  225.       Q.  How do I control other applications with DDE?
  226.  
  227.       A.  You can use ObjectPAL to send commands to other
  228.           applications.  You use the same macro command structure
  229.           the controlled application understands.
  230.  
  231.  
  232.       Q.  In ObjectPAL, how do I "Poke" data into another
  233.           application?
  234.  
  235.       A.  You would open the channel using the DDE open and setItem
  236.           method, and assign the data as a value to the DDE
  237.           variable.  You will find an example of this in the
  238.           ObjectPAL Developer's Guide.  It is explained and
  239.           illustrated in Chapter 11, DDE: Link to other
  240.           applications, DDE conversations, Conversing, DDE-style,
  241.           Sending data.
  242.  
  243.  
  244.       Q.  Why wouldn't data update via a Link from Paradox for
  245.           Windows?
  246.  
  247.       A.  PDOXWIN may not be in the DOS PATH.  You must exit
  248.           Windows, edit the AUTOEXEC.BAT file putting PDOXWIN in
  249.           the PATH.  Then re-execute AUTOEXEC or reboot.  This
  250.           allows you to use Paradox for Windows as a DDE Server.
  251.  
  252.  
  253.       Q.  Why can't I Paste Link into or "Poke" data into Windows
  254.           Write?
  255.  
  256.       A.  Windows Write will only establish a DDE Link with a
  257.           registered OLE Server.  Paradox for Windows is a OLE
  258.           Client only.
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  273.   VERSION  :  1.0
  274.        OS  :  WIN
  275.      DATE  :  May 7, 1993                              PAGE  :  5/8
  276.  
  277.     TITLE  :  Answers to Common Questions About DDE and OLE
  278.  
  279.  
  280.  
  281.  
  282.    
  283.   Using Paradox for Windows as an OLE Client/Server
  284.  
  285.       Q.  Is Paradox for Windows an OLE Client, Server, or both?
  286.  
  287.       A.  Paradox for Windows is an OLE Client only.  But, you can
  288.           simulate an OLE link of any Paradox for Windows file to
  289.           another OLE Client using the command line option of
  290.           Windows Object Packager.
  291.  
  292.  
  293.       Q.  Can Paradox for Windows OLE Embed, Link, or do both?
  294.  
  295.       A.  You can Embed only.  You can link to files using the
  296.           command line option in Windows Object Packager or DDE
  297.           Paste Link into a Table's Alphanumeric field.
  298.  
  299.  
  300.       Q.  Why do I see only an icon of the application my document
  301.           came from in an OLE Table field?
  302.  
  303.       A.  This is how the OLE Server (the application you're
  304.           pasting from) presents itself to the Clipboard; as an
  305.           icon Picture.  Some Servers present a graphic (such as
  306.           paint and spreadsheet applications).  You will find that
  307.           all OLE Clients paste the same way.
  308.  
  309.  
  310.       Q.  What are the different methods of interactively Pasting
  311.           (Embedding) and Launching OLE servers from Paradox for
  312.           Windows?
  313.  
  314.       A.  Tables:
  315.               Embed -  Edit | Paste
  316.               Launch - [Shift+F2] or double-click
  317.  
  318.           Forms - Data View - Fields:
  319.               Embed -  Edit | Paste or right-click | Paste
  320.               Launch - Double-click or right-click | [ServerName] |
  321.                          Edit
  322.  
  323.           Forms - Data View - Objects:
  324.               Must Embed and launch from Form Design
  325.  
  326.  
  327.  
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.  
  338.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  339.   VERSION  :  1.0
  340.        OS  :  WIN
  341.      DATE  :  May 7, 1993                              PAGE  :  6/8
  342.  
  343.     TITLE  :  Answers to Common Questions About DDE and OLE
  344.  
  345.  
  346.  
  347.  
  348.    
  349.           Forms - Design View - Fields:
  350.               Must Embed and launch from Data View
  351.  
  352.           Forms - Design View - Objects:
  353.               Embed -  Right-click | Define OLE | Paste
  354.               Launch - Double-click or right-click | Define OLE |
  355.                          [ServerName] | Edit
  356.  
  357.           Reports - Data/Design View - Fields:
  358.               Must Embed and launch from a Table window or in a
  359.               Form Data View
  360.  
  361.           Reports - Data View - Objects:
  362.               Must Embed and launch from Report Design
  363.  
  364.           Reports - Design View - Objects:
  365.               Embed -  Right-click | Define OLE | Paste
  366.               Launch - Double-click or right-click | Define OLE |
  367.                          [ServerName] | Edit
  368.  
  369.  
  370.       Q.  When using the EditLaunchServer action constant in a
  371.           pushButton method, why does nothing happen?
  372.  
  373.       A.  The OLE object must first be set in focus.
  374.  
  375.  
  376.       Q.  Why don't changes appear when using the OLE variable Edit
  377.           method to edit and save an OLE object.
  378.  
  379.       A.  The OLE variable Edit method executes asynchronously.
  380.           You cannot "wait" for an OLE server to close, so the
  381.           variable gets destroyed if it's declared locally because
  382.           the method finishes executing before the Server closes.
  383.           To solve this problem, declare the variable globally, and
  384.           have a separate method assign the OLE object to it.  You
  385.           can use one of the following two different approaches to
  386.           accomplish this.
  387.    
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  405.   VERSION  :  1.0
  406.        OS  :  WIN
  407.      DATE  :  May 7, 1993                              PAGE  :  7/8
  408.  
  409.     TITLE  :  Answers to Common Questions About DDE and OLE
  410.  
  411.  
  412.  
  413.  
  414.           1.  Use the OLE variable Edit method as:
  415.  
  416.               Page level:
  417.                   var
  418.                       olevar    ole
  419.                   endVar
  420.  
  421.                   method open(var eventInfo Event)
  422.                       maximize()
  423.                       edit()
  424.                       olevar=olefield.value
  425.                   endmethod
  426.  
  427.                   method setFocus(var eventInfo Event)
  428.                       olefield.value=olevar
  429.                   endmethod
  430.  
  431.               Pushbutton:
  432.                   method pushButton(var eventInfo Event)
  433.                       olefield.moveTo()
  434.                       olevar.edit("Test",0)
  435.                   endmethod
  436.  
  437.           2.  Instead of using the OLE variable Edit method, use
  438.               the EditLaunchServer constant as:
  439.  
  440.               method pushButton(var eventInfo Event)
  441.                   Edit()
  442.                   olefield.action(EditLaunchServer)
  443.               endmethod
  444.  
  445.  
  446.       Q:  Why does a picture pasted into an OLE field from
  447.           Paintbrush look incorrect?
  448.  
  449.       A:  This can happen if the picture is pasted into Paintbrush,
  450.           saved, and then pasted into a Paradox for Windows OLE
  451.           field before it is closed and reopened in Paintbrush.
  452.           This can also happen if the picture came from a GIF or a
  453.           TIF.  If you close the Paintbrush picture and reopen it,
  454.           it may look incorrect.  This is because Paintbrush saved
  455.           the image incorrectly.  Convert the image in the source
  456.           application to an 8 bit BMP file.  Then, you can open it
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.   PRODUCT  :  Paradox for Windows                   NUMBER  :  1439
  471.   VERSION  :  1.0
  472.        OS  :  WIN
  473.      DATE  :  May 7, 1993                              PAGE  :  8/8
  474.  
  475.     TITLE  :  Answers to Common Questions About DDE and OLE
  476.  
  477.  
  478.  
  479.  
  480.           correctly in Paintbrush and Paste into Paradox for
  481.           Windows as an Object in OLE.
  482.    
  483.  
  484.   Suggested Reading:
  485.  
  486.   Microsoft Windows 3.1 Reading
  487.   Microsoft Windows 3.1 User's Guide              Chapter 13
  488.   Microsoft Windows 3.1 Resource Kit              Chapter 11
  489.   Microsoft Windows 3.1 Software Development Kit  Volume 1,
  490.                                                     Chapter 5 and 6
  491.    
  492.   Paradox for Windows Reading
  493.   User's Guide
  494.       Chapter 15
  495.  
  496.   ObjectPAL Developer's Guide
  497.       Chapter 5, "Passing arguments"
  498.       Chapter 9, "OLE: Object Linking and Embedding"
  499.       Chapter 11, "DDE: Link to other applications"
  500.  
  501.   ObjectPAL Reference manual
  502.       Chapter 3, "return"
  503.       Chapter 4, "AnyType", "view", "DDE", "OLE"
  504.       Chapter 5, "index"
  505.  
  506.   TI 1438, "An Introduction to DDE and OLE"
  507.  
  508.  
  509.   DISCLAIMER: You have the right to use this technical information
  510.   subject to the terms of the No-Nonsense License Statement that
  511.   you received with the Borland product to which this information
  512.   pertains.
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.