Ok I have a little (big) problem...I have 2 recordsets...1 of them only returns 1 value...the other recordset gives me more values...I loop through the recordset...And try to check if both values are the same...If they are the same I write BLA to the screen...
When I run the code...I get the following error...VB Code:
<%@LANGUAGE="VBSCRIPT"%> <!--#include file="../Connections/conn.asp" --> <% set rsCall = Server.CreateObject("ADODB.Recordset") rsCall.ActiveConnection = MM_connMSIS_STRING rsCall.Source = "SELECT ContactID FROM dbo.Calls WHERE CallID = 38" rsCall.CursorType = 0 rsCall.CursorLocation = 2 rsCall.LockType = 3 rsCall.Open() rsCall_numRows = 0 %> <% set rsContactje = Server.CreateObject("ADODB.Recordset") rsContactje.ActiveConnection = MM_connMSIS_STRING rsContactje.Source = "SELECT ContactID, Achternaam FROM Contactpersonen WHERE FirmaID = 3503167" rsContactje.CursorType = 0 rsContactje.CursorLocation = 2 rsContactje.LockType = 3 rsContactje.Open() rsContactje_numRows = 0 %> <% Dim Repeat1__numRows Repeat1__numRows = -1 Dim Repeat1__index Repeat1__index = 0 rsContactje_numRows = rsContactje_numRows + Repeat1__numRows %> <html> <head> <title>Untitled Document</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> <table width="75%" border="1"> <% While ((Repeat1__numRows <> 0) AND (NOT rsContactje.EOF)) %> <tr> <td><%=(rsCall.Fields.Item("ContactID").Value)%></td> <td> <% If (rsCall.Fields.Item("ContactID").Value = rsContactje.Fields.Item("ContactID").Value) Then %> BLA <% End If %> #####LINE 45##### </td> <td><%=(rsContactje.Fields.Item("ContactID").Value)%></td> </tr> <% Repeat1__index=Repeat1__index+1 Repeat1__numRows=Repeat1__numRows-1 rsContactje.MoveNext() Wend %> </table> </body> </html> <% rsCall.Close() %> <% rsContactje.Close() %>
Microsoft VBScript runtime error '800a000d'
Type mismatch
/develop/TestsChris/TMPgd0um8v5f3.asp, line 45
Does anyone have a clue on what goes wrong?




Reply With Quote