Board index » delphi » Urgent: ASP-->Delphi3-->Oracle Backend??????

Urgent: ASP-->Delphi3-->Oracle Backend??????

Does anyone know how to implement the above using COM ???
Are there any samples or URLs I can refer to in order to implement the above
method???

I had written the following code:

procedure Tlogin.verifyuser;
Var
  SqlStr, PasWord : String;

begin

     SqlStr := '';
     SqlStr := 'Select Password From SOC_USER_MST Where Upper(UserId) =
'+''''+ Trim(m_userid)+ '''';
     With VerifyPasswd Do Begin
         Sql.Clear;
         Sql.Add(SqlStr);
         Open;

         PasWord:=UpperCase(Trim(FieldByName('Password').Asstring));
         If (Eof and Bof)OR (Encrypt(UpperCase(Trim(m_password)),
Trim(m_userid)) <> PasWord ) Then begin
            failogin;
            Exit;
         end
         else begin
         ShowMessage (' Please proceed ... ');

         end;
         end;
file://ShellExecute(Handle, nil, 'D:\Inetpub\wwwroot\trial\Project6.htm',
nil, nil, SW_SHOWNORMAL);

end;

The ASP codes:

set obj = Server.CreateObject("logpro.login")
  obj.userid = Request.Form("userid")
  obj.password = Request.Form("password")
  obj.verifyuser

But when i run on the webpage, the error message says that:

error '8000ffff'
Unexpected Failure.

Where can i check for the meaning of the ASP error code like '8000ffff'?

Thanx.

 

Re:Urgent: ASP-->Delphi3-->Oracle Backend??????


Error 8000ffff is also known as Catastrophic Error. It is an error which
could not be correctly identified - check out the COM documentation error
and the COM-related pascal units to see when the error gets triggered.

Is TLogin an object that implements IDispatch? Are you sure your libraries
are correctly registered? Are Borland's libraries registered, too? (you will
need them if you use IStrings or other similar interfaces).

BTW, ShowMessage is a function you do *not* want to use in ASP. ASP runs on
another desktop, and it will hang IIS. Try the following routine for
debugging purposes:

procedure ReportUser(const Message :string);
begin
  MessageBox(0, PChar(Message), nil, MB_SERVICE_NOTIFICATION or MB_TOPMOST);
end;

The ShellExecute you have there would launch a browser on the virtual
desktop, too - an you would have no way to close it, draining system
resources.

May the code be with you.

Marcelo Lopez Ruiz

Other Threads