looping problem

Discussion in 'ASP General' started by shank, Feb 21, 2004.

  1. shank

    shank Guest

    I am getting the following error on the below code.

    Expected end of statement
    Next i
    -----^

    How do I fix that?
    thanks!

    <%
    Dim DataConn2
    Dim i
    Set DataConn2 = Server.CreateObject("ADODB.Connection")
    DataConn2.Open MM_kasKSS_STRING
    For i = 0 To rsOrderDetails.ListCount -1 Step 1
    SQL = "INSERT INTO wsOrderDetails (OrderID, OrderNo, Description, Qty,
    PriceEach, Priceline) "
    SQL = SQL & "Values ('" & iod_OrderID & "', '" & iod_OrderNo & "', '" &
    iod_Description & "', " & iod_Qty & ", " & iod_PriceEach & ", " &
    iod_Priceline & ")"
    Next i
    DataConn2.Execute(SQL)
    %>
     
    shank, Feb 21, 2004
    #1
    1. Advertisements

  2. shank

    Chris Barber Guest

    See post in the first thread - I presume this was a mistake post and was
    meant to be part of the main thread.

    Chris.

    "shank" <> wrote in message
    news:ehwYycM%...
    I am getting the following error on the below code.

    Expected end of statement
    Next i
    -----^

    How do I fix that?
    thanks!

    <%
    Dim DataConn2
    Dim i
    Set DataConn2 = Server.CreateObject("ADODB.Connection")
    DataConn2.Open MM_kasKSS_STRING
    For i = 0 To rsOrderDetails.ListCount -1 Step 1
    SQL = "INSERT INTO wsOrderDetails (OrderID, OrderNo, Description, Qty,
    PriceEach, Priceline) "
    SQL = SQL & "Values ('" & iod_OrderID & "', '" & iod_OrderNo & "', '" &
    iod_Description & "', " & iod_Qty & ", " & iod_PriceEach & ", " &
    iod_Priceline & ")"
    Next i
    DataConn2.Execute(SQL)
    %>
     
    Chris Barber, Feb 21, 2004
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mothra
    Replies:
    3
    Views:
    603
  2. CJ
    Replies:
    0
    Views:
    2,009
  3. Stephan Bour
    Replies:
    1
    Views:
    559
    Hermit Dave
    Dec 12, 2003
  4. VB Programmer
    Replies:
    3
    Views:
    5,536
    Marina
    Jul 27, 2004
  5. news.amnet.net.au
    Replies:
    1
    Views:
    827
    =?UTF-8?b?TMSByrtpZSBUZWNoaWU=?=
    Apr 13, 2004
  6. Replies:
    2
    Views:
    1,495
  7. Yodai

    a looping problem.....

    Yodai, Feb 11, 2004, in forum: C Programming
    Replies:
    0
    Views:
    381
    Yodai
    Feb 11, 2004
  8. Replies:
    5
    Views:
    485
Loading...