Active Server Objects and Databases

Now, let's make the example a bit more useful and introduce a database or table in it, so we can demonstrate how to perform a query or open a table on the server and show the results inside an Active Server Page. In order to add this functionality, you should first add a new data module, using File, New, Data Module.

Give the Name property of the data module a new value, say DataModuleASP, and save this new unit in file DataMod.pas. Also choose File, Save All to save the entire project so that your main project file D6ASP.dpr will contain the data module in its uses clause. Inside this data module, you will use a TClientDataSet component from the Data Access tab because this will be the simplest way of providing ...

Get Borland® Delphi™ 6 Developer's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.