You can get ASP stuf from within your app


eg, incomplete source(hacked out of my file) Hope this helps

Neil

function TTASPBase.OnStartPage(const pScriptContext: IUnknown): Integer;
var
        IaspScript                      : IScriptingContext;
  sSessionId                    : widestring;
  sApplication          : widestring;
  sDataBaseDSN          : widestring;
  sServerMapPath  : string;
begin
        if pScriptContext <> nil then begin
                IaspScript := pScriptContext as IScriptingContext;
        sSessionId := IaspScript.Session.SessionId;
    sApplication := IaspScript.Session.get_Value('SOGApplication');
    sDataBaseDSN := IaspScript.Application.get_Value('DataBaseDSN');
    if sSessionId = '' then
      sSessionId := 'NoSessionId';
    sServerMapPath := IaspScript.Server.MapPath('.');
  end
  else begin
        // Used from test exe so no script context
        sSessionId               := DEBUGSESSIONID;
    sServerMapPath := CSERVERMAPPATH;
  end;

  if sApplication = '' then
    sApplication := CDEFAULTAPPLICATION;
  if sDataBaseDSN = '' then
    sDataBaseDSN := CDATABASEDSN;

  FStatusMessage := '(Dsn : '         +  sDataBaseDSN + ') '+
                    '(Map Path : '    + sServerMapPath + ') '+
                    '(Application : ' + sApplication + ') '+
                    '(Session Id : '  + sSessionId +') ';

end;

> -----Original Message-----
> From: Chris Crowe [SMTP:[EMAIL PROTECTED]]
> Sent: Sunday, March 28, 1999 10:07 AM
> To:   Multiple recipients of list delphi
> Subject:      RE: [DUG]:  Translating Virtual paths to physical paths
> 
> I found that I can use the Server.MapPath command, but I thought my
> control could do the translating, It does not matter that much, good
> to find a method that works.
> 
> <%
>   FileName = "PageLinks.Txt"
>   FileName = Server.MapPath (FileName) 
>   Set ObjDelphi = Server.CreateObject("AdrockPageLinks.PageLinks")  
>   ObjDelphi.FileName = FileName
>   ObjDelphi.Name    = "Chris Crowe"
>   ObjDelphi.WriteInfo
> 
>   Set ObjDelphi = Nothing
> 
> %>
> 
> Thanks..
> 
> Christopher Crowe (Software Developer)
> Microsoft MVP, MCP
> 
> Byte Computer & Software LTD
> P.O Box 13-155 
> Christchurch
> New Zealand
> Phone/Fax (NZ) 03-3651-112
> 
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On
> > Behalf Of Laurence Bevan
> > Sent: Saturday, 27 March 1999 23:03
> > To: Multiple recipients of list delphi
> > Subject: Re: [DUG]: Translating Virtual paths to physical paths
> > 
> > 
> > Why not use FileSystemObject directly from ASP? What type of file is
> it?
> > 
> > Laurence Bevan
> > 
> > 
> > ------------------------------------------------------------------
> > ---------
> >     New Zealand Delphi Users group - Delphi List -
> [EMAIL PROTECTED]
> >                   Website: http://www.delphi.org.nz
> > 5yZ-~bRǫ
> 躐-~b.+-ui?'^-~b'g>+^?i0ץ     
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to