User's Guide
Part V. The SQL Anywhere Programming Interfaces
Chapter 37. The WSQL DDE ServerMicrosoft Word Basic supports DDE. The following example contains sample Word Basic code to access the WSQL DDE Server DDE server. The two different ways of retrieving the data are demonstrated: using the clipboard and receiving the data directly.
Sub MAIN' Initialize a DDE channel to the databasechan = DDEInitiate("WSQLDDE", "dba,sql,sademo")' Connect to the databaseDDEPoke chan, "connect", ""' Get the data using the clipboardDDEPoke chan, "clip_data", \"select emp_lname \from employee where emp_id = 102"EditPaste' Insert the data directly into the documentDDEPoke chan, "clear", \"select emp_lname \from employee where emp_id = 105"Insert DDERequest$(chan, "data")' Disconnect from the databaseDDEPoke chan, "disconnect", ""' Terminate the DDE connectionDDETerminate(chan)End Sub