1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Type mismatch: 'arrOutput3'

Discussion in 'C#' started by jhd1967, Jan 6, 2009.

  1. #1
    i have this script that's be giving me errors what ever i do. if you could please help
    Type mismatch: 'arrOutput3' Line: 38
    <select name="model" onchange="getpage(<% Response.Write ""&arrOutput3(1,i)&"" %>,this.value)">


    The entire script:

    <% set objDBConnection3 = Server.CreateObject("ADODB.Connection")
    objDBConnection3.ConnectionTimeout = 15
    objDBConnection3.CommandTimeout = 30%>
    <%
    objDBConnection3.Open "dataconnection;"
    set objDBCommand3 = Server.CreateObject("ADODB.Command")
    objDBCommand3.ActiveConnection = objDBConnection3
    objDBCommand3.CommandText = "SELECT model ,CAT_ID,make FROM listing WHERE CAT_ID = ? ORDER BY model ASC"
    objDBCommand3.CommandType = 1


    strmarques3 = "1"
    If (Request.QueryString("catid") <> "") Then
    strmarques3 = Request.QueryString("catid")
    %>

    <%
    set objDBParam3 = objDBCommand3.CreateParameter("@column",5, 1, -1)
    objDBCommand3.Parameters.Append objDBParam3
    objDBCommand3.Parameters("@column") = strmarques3
    set objDBParam3 = Nothing
    set objDBRecords3 = objDBCommand3.Execute
    If Not objDBRecords3.EOF Then
    arrOutput3 = objDBRecords3.GetRows()
    objDBRecords3.Close
    objDBConnection3.Close
    Set objDBConnection3 = Nothing
    Set objDBRecords3 = Nothing %>
    <%
    Dim occasions
    occasions = UBound(arrOutput3, 2)
    'Response.Write ""&arrOutput3(2,i)&""
    %>
    <input name="marque" type="hidden" id="make" value="<% Response.Write ""&arrOutput3(2,i)&"" %>" />


    <% End If %>
    <select name="model" onchange="getpage(<% Response.Write ""&arrOutput3(1,i)&"" %>,this.value)">
    <option value="">Tous</option>
    <% For i = 0 To UBound(arrOutput3, 2)%>

    <option value="<%=arrOutput3(0,i)%>"><%=arrOutput3(0,i)%></option>
    <% Next
    %>
    </select>

    <% End If %>
     
    jhd1967, Jan 6, 2009 IP
  2. jhd1967

    jhd1967 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Any one !!!
     
    jhd1967, Jan 7, 2009 IP
  3. nyxano

    nyxano Peon

    Messages:
    417
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Maybe I am missing something here but how is "i" defined in your SELECT line? In your OPTIONs, "i" is defined as the value in the FOR loop but that is after your SELECT line. I'm thinking that because "i" is null before it gets to the for loop, the type mismatch is because you get arrOutput3(2,)?
     
    nyxano, Jan 8, 2009 IP