unit DrBob42ASP; {$WARN SYMBOL_PLATFORM OFF} interface uses ComObj, ActiveX, AspTlb, D6ASP_TLB, StdVcl; type TDrBob42 = class(TASPObject, IDrBob42) protected procedure OnEndPage; safecall; procedure OnStartPage(const AScriptingContext: IUnknown); safecall; procedure IDrBob42.OnStartPage = IDrBob42_OnStartPage; procedure IDrBob42_OnStartPage(const AScriptingContext: IUnknown); safecall; procedure Welcome; safecall; end; implementation uses ComServ, DataMod; procedure TDrBob42.OnEndPage; begin inherited OnEndPage; end; procedure TDrBob42.OnStartPage(const AScriptingContext: IUnknown); begin inherited OnStartPage(AScriptingContext); end; procedure TDrBob42.IDrBob42_OnStartPage(const AScriptingContext: IUnknown); begin inherited OnStartPage(AScriptingContext); end; procedure TDrBob42.Welcome; var Str: String; DM: TDataModuleASP; begin Str := Request.Form.Item['Name']; //Str := Session.Value['Name']; Response.Write('Hello, '+Str+'!'); Response.Write('
'); Response.Write('Welcome to Delphi 6 and ASP Objects'); try Response.Write('
'); DM := TDataModuleASP.Create(nil); Response.Write(DM.DataSetTableProducer1.Content); { with DM.ClientDataSet1 do try Open; First; Response.Write('
Common Name | Notes |
'); Response.Write(FieldByName('Common_Name').AsString); Response.Write(' | '); Response.Write(FieldByName('Notes').AsString); Response.Write(' |