Results 1 to 2 of 2

Thread: ASP and COM

  1. #1
    Join Date
    Dec 1969

    Default ASP and COM

    Can anyone please help me on this?<BR><BR>I have created an ActiveX dll with all Classes in it set to MultiUse.<BR>In ASP, using VBScript, when I create an object of a class from this <BR><BR>dll and try to use a method of the object, ASP gives me an error like <BR><BR>below:<BR><BR>TSBusinessLogic error &#039 800a000d&#039 <BR><BR>Type mismatch <BR><BR>/tssan/CheckLogin.asp, line 15 <BR><BR>TSBusinessLogic is the name of my dll server.<BR><BR>The ASP code I have written is as follows:<BR><BR>Dim objEmployee<BR>Dim employee_id<BR>Dim login_id<BR>Dim password<BR><BR>&#039The login_id and password submitted from the login page are captured <BR><BR>here<BR>login_id=Request.Form("login_id")< BR>password=Request.Form("password")<BR><BR>Set objEmployee=Server.CreateObject("TSBusinessLogic.E mployee")<BR><BR>employee_id=objEmployee.checkLogi n(CStr(login_id),CStr(password))<BR><BR>&#039The code fails at this point giving the error mentioned above.<BR><BR>The code for the function checkLogin() in my dll server is as follows:<BR><BR>Public Function checkLogin(strlogin_id As String, strpassword As <BR><BR>String) As String<BR> Dim strSQL As String<BR> Dim rsLogin As ADODB.Recordset<BR> Dim objQuery As New Query<BR> <BR> &#039Pass the DSN to the Query object<BR> objQuery.DSN = DSN<BR> <BR> &#039check whether the login and password combination exists in the <BR><BR>database<BR> strSQL = "Select employee_id from employee_detail_table where <BR><BR>login_id=&#039" & strlogin_id & "&#039 And password=&#039" & strpassword & "&#039"<BR> Set rsLogin = objQuery.getRecordset(strSQL)<BR> If rsLogin.BOF = True And rsLogin.EOF = True Then<BR> &#039The login_id and password combination does not exist in <BR><BR>employee_detail_table<BR> checkLogin = ""<BR> Else<BR> &#039If the login_id and password combination exists, then return <BR><BR>the employee_id<BR> checkLogin = sLogin.Fields("employee_id").Value<BR> End If<BR> <BR> &#039Deallocate memory for objects<BR> Set rsLogin = Nothing<BR> Set objQuery = Nothing<BR><BR>End Function<BR><BR>I have searched through MSDN, but all it has to say is that VBScript <BR><BR>2.0 requires the non-variant types should be passed by value.<BR><BR>Please help me out if possible.<BR><BR>Regards<BR>Santhosh

  2. #2
    Forum Police Guest

    Default CROSSPOST

    Please do not crosspost

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts