Can anyone see what is wrong with this array, plea

Results 1 to 2 of 2

Thread: Can anyone see what is wrong with this array, plea

  1. #1
    Join Date
    Dec 1969

    Default Can anyone see what is wrong with this array, plea

    redim ticket(Total)<BR>redim ticketT(totalt)<BR> For i = 1 To Total<BR> ticket(i) = Request("TickNum")(i)<BR> tickett(i) = request("tickBK")(i)<BR> &#039 put the sql statement in here<BR> Set Conn = Server.CreateObject("ADODB.Connection")<BR> Conn.Open gConnString<BR> Transactsql = "Exec Transact " & MemberID & "," & tickett(i) &"," & ticket(i)<BR> Response.Write "&nbsp;" & MemberID & "," & tickett(i) &"," & ticket(i)&"<BR>"<BR> Set rs = Conn.Execute(Transactsql) <BR> <BR> Response.Write rs("BasketID")(i) & "<BR>" &#039&#060;&#060;&#060;line 34<BR> <BR> <BR> Next<BR><BR>the above code finds out how many form fields there are then sends out an sql statement, that bit works fine.<BR>Now the idea is that once the sql server stored procedure recives the sql statement then it sends back a &#039basketID&#039 number. So if two dates are sent up to the sql server then 2 basketids get returned, however using the above code it only returns one basketid and then bombs out on the second with<BR>a <BR>&#039ADODB.Fields error &#039 800a0cc1&#039 <BR><BR>ADO could not find the object in the collection corresponding to the name or ordinal reference requested by the application. <BR><BR>/now/dates/tickets/Transact.asp, line 34 &#039<BR><BR>error<BR><BR>can any body see what is going wrong....<BR><BR>many thanks<BR><BR>Ade<BR>

  2. #2
    Join Date
    Dec 1969

    Default *WHAT* array???

    You are doing<BR>&nbsp; &nbsp; Response.Write rs("BasketID")(i) <BR><BR>But a record field can *NEVER* be an array. So that can&#039t possibly work. You need to *assign* the rs("BasketID") to an array element, presumably?<BR><BR><BR><BR>

Posting Permissions

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