jasonkslim
IS-IT--Management
Hi ALL;<br>I have an COm object run on MTS/NT4 with IIS4 running. When i call this COM object from my ASP page, it's prompt me this error message :- (Please HELP /Advise as i have met my project deadline !! )<br><br>ComProject error '800a000d' <br>Type mismatch <br>/remisier/Csecurity1.asp, line 114 <br><br>My ComProject VB Code:<br>'Implements ObjectControl<br>' Compile Error : Object Module needs to implement 'CanBePooled' for interface 'ObjectControl'<br>' Failed to compile 'Implement ObjectControl' code statement and showing above mention message!<br>'Private objOContext<br> <br>Private Function getremisiercode(ByVal staff As Variant, ByVal newpassword As Variant) As Variant<br> On Error GoTo ErrCheck<br> <br> Dim objOContext As ObjectContext<br> Set objOContext = GetObjectContext()<br> <br> Dim sqltxt As String<br> sqltxt = "Select remisiercode from employee where staffid='" & staff & "'"<br> sqltxt = sqltxt & " and password='" & newpassword & "'"<br> <br> Dim conn1 As ADODB.Connection<br> Dim rs1 As ADODB.Recordset<br> Set conn1 = objOContext.CreateInstance("ADODB.Connection"<br> Set rs1 = objOContext.CreateInstance("ADODB.Recordset"<br> conn1.Open "DRIVER=SQL Server;SERVER=SQL7;DATABASE=mbos_v109;UID=webuser;PASSWORD=webuser "<br> <br> Set rs1 = conn1.Execute(sqltxt)<br> <br> If rs1.EOF Then<br> getremisiercode = ""<br> Else<br> getremisiercode = rs1.Fields("remisiercode"<br> End If<br> objOContext.SetComplete<br> conn1.Close<br> rs1.Close<br> Set conn1 = Nothing<br> Set rs1 = Nothing<br> Set objOContext = Nothing<br> <br> ErrCheck:<br> GetObjectContext.SetAbort<br> Err.Raise Err.Number, Err.Source, Err.Description<br>End Function<br><br>My ASP Page Code:<br><%@ Language=VBScript transaction=Supported %><br><%dim remisiercode<br>Set loginid = Server.CreateObject("Comproject.ComMain"<br>set remisiercode = loginid.getremisiercode(staff,newpassword) %><br><br>THANKS IN ADVANCE <br><br>THANKS & Regards<br>Jason<br>