| **Navigation:**  [[introduction.htm|Language Reference]] > App A - DDE, OLE, and OCX > DDE Procedures >====== DDESERVER (return DDE server channel) ====== | [[dderead get data from dde server .htm|{{btn_prev_n.gif|Previous page}}]][[introduction.htm|{{btn_home_n.gif|Return to chapter overview}}]][[ddetopic return server topic .htm|{{btn_next_n.gif|Next page}}]] | | || **DDESERVER(** [ //application// ] [, //topic// ] **)** {{blk2blue.jpg|blk2blue.jpg}} | **DDESERVER** | Returns a new DDE server channel number. | | //application// | A string constant or variable containing the name of the application. Usually, this is the name of the application. If omitted, the filename of the application (without extension) is used. | | //topic// | A string constant or variable containing the name of the application-specific topic. If omitted, the //application// will respond to any data request. | The **DDESERVER** procedure returns a new DDE server channel number for the //application// and //topic//. The channel number specifies a //topic// for which the //application// will provide data. This allows a single Clarion //application// to register as a DDE server for multiple //topics//. **Return Data Type:     **LONG **Example:** **DDERetVal  STRING(20)** **WinOne   WINDOW,AT(0,0,160,400)** **          ENTRY(@s20),USE(DDERetVal)** **         END** **MyServer LONG** ** CODE** ** OPEN(WinOne)** ** MyServer = ****DDESERVER****('MyApp','DataEntered')  !Open as server** ** ACCEPT** **  CASE EVENT()** **  OF EVENT:DDErequest           !As server for data requested once** **   DDEWRITE(MyServer,DDE:manual,'DataEntered',DDERetVal) !Provide data once** **  OF EVENT:DDEadvise            !As server for constant update request** **   DDEWRITE(MyServer,15,'DataEntered',DDERetVal)** **                                !Check for change every 15 seconds** **                                !and provide data whenever changed** **  END** ** END** **See Also:** [[ddeclient return dde client channel .htm|DDECLIENT]] [[ddewrite provide data to dde client .htm|DDEWRITE]]