looping problem

S

shank

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)
%>
 
C

Chris Barber

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

Chris.

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)
%>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top