To create your handler, perform the following steps:
- Create an .ini file for the RDS handler. For example, the following .ini file defines the "MyDatabase" data source to connect to the ODBC data source name (DSN) "MyServer":
[connect MyDatabase]
Access=ReadWrite
Connect="DSN=MyServer"
[sql authors]
;If we want to disable unknown SQL values, we set Sql to an invalid query.
Sql="select * from pubs.dbo.authors"
Notice the use of the Handler property for the control, and the use of the handler names "MyDatabase" and "authors". "MyDatabase" is defined in the Connect item of the .ini file as "authors", which will hold the SQL select to be used.
- Place the .ini file in the Winnt folder of the RDS Server computer.
- Create the object tag in HTML for the RDS data control. It should resemble the following:
<HTML>
<BODY>
<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33"
ID="dsoData" HEIGHT="0" WIDTH="0">
<PARAM NAME="Server" VALUE="http://MyIISServer">
<PARAM NAME="Connect" VALUE="Data source=MyDatabase">
<PARAM NAME="Handler" VALUE="MSDFMAP.Handler,dfmap.ini">
<PARAM NAME="SQL" VALUE="authors">
</OBJECT>
<TABLE ID="tblData" DATASRC="#dsoData" BORDER=1>
<TR><TD><INPUT TYPE="TEXT" DATAFLD="au_id"></TD></TR>
</TABLE>
</BODY>
</HTML>
- In the .ini file, replace "MyServer" with the name of your DSN.
- In the HTML object tag, replace "MyIISServer" with the name of your server.