Using the SQL Topic

Previous Next

In a conversation with USoft Developer about the SQL topic, you may send commands to the USoft DDE server, which are passed to the SQL script interpreter. This interpreter understands SQL DML statements but not DDL statements. In other words, it allows you to manipulate the data in the database, but not to create new tables and views or change existing ones. Before a DML statement is executed, it is checked by the conceptual processor, so the execution of these SQL statements never results in the violation of database integrity.

In addition to SQL statements, the SQL Command interpreter can run the global actions of USoft Developer, such as MessageInformation(), DataCommit() and CommandSystemBackground().

To send a SQL statement to the USoft DDE server, write the following procedure:

HSZ   hszService;

HSZ   hszTopic;


hszService = DdeCreateStringHandle(


    (LPCSTR)"USoft Developer",


hszTopic = DdeCreateStringHandle(




hConv = DdeConnect(





pData = (LPSTR) "update persons \

    set name = 'Jansen' \

    where person_id = 1514";

hData = DdeCreateDataHandle(









    (LPBYTE) hData,