Here's the code:
<%@ Language=VBScript %>
<!--#include file="LD1VBFunction.asp"-->
<%
Response.Buffer = True
dim conLink4, rsPO, rsPOD, strSQL, i, count
count = Request.Form("count"
set conLink4 = server.CreateObject("adodb.connection"

conLink4.ConnectionString = strConnectLink4
conLink4.Open
set rsPO = server.CreateObject("adodb.recordset"

strSQL = "SELECT PurchaseOrderID, VendorNumber, VendorDirections, " & _
"BillToID, BillToDirections, ShipToPropertyID, ShipToDirections, " & _
"Buyer, TermsName, ShipViaName, DeliveryDate, CIPProjectNumber, " & _
"Company, CostCenter, Tax, Freight, GLAcctNo, POOrderDate FROM PurchaseOrder"
rsPO.Open strSQL, conLink4, 3, 3
with rsPO
.AddNew
.Fields("PurchaseOrderID"

= Request.Form("strPONum"

.Fields("VendorNumber"

= Request.Form("strVenNum"

.Fields("VendorDirections"

= Request.Form("strVenDesc"

.Fields("BillToID"

= Request.Form("strBillToID"

.Fields("BillToDirections"

= Request.Form("strBTDesc"

.Fields("ShipToPropertyID"

= Request.Form("strShipToID"

.Fields("ShipToDirections"

= Request.Form("strSTDesc"

.Fields("Buyer"

= Request.Form("strBuyer"

.Fields("TermsName"

= Request.Form("strTerms"

.Fields("ShipViaName"

= Request.Form("strShipVia"

.Fields("DeliveryDate"

= Request.Form("strDelivDate"

.Fields("CIPProjectNumber"

= Request.Form("strCapProjNo"

.Fields("Company"

= Request.Form("strCompanyNo"

.Fields("CostCenter"

= Request.Form("strCostCtr"

.Fields("Tax"

= Request.Form("strTax"

.Fields("Freight"

= Request.Form("strFreight"

.Fields("GLAcctNo"

= Request.Form("strGLAcctNo"

.Fields("POOrderDate"

= Left(Date,8)
.Update
end with
set rsPO = nothing
set rsPOD = server.CreateObject("adodb.recordset"

strSQL = "SELECT PurchaseOrderID, ItemCode, Description, Quantity, " & _
"UnitOfMeasure, PricePerUnit, ExtendedPrice FROM PurchaseOrderDetail"
rsPOD.Open strSQL, conLink4, 3, 3
i = 0
with rsPOD
while i < count
.AddNew
.Fields("PurchaseOrderID"

= Request.Form("strPONum"

.Fields("ItemCode"

= Request.Form("strVenItemCd" & i)
.Fields("Quantity"

= csng(Request.Form("strUnits" & i))
.Fields("UnitOfMeasure"

= Request.Form("strUM" & i)
.Fields("PricePerUnit"

= ccur(Request.Form("strCost" & i))
.Fields("ExtendedPrice"

= ccur(Request.Form("Extended" & i))
.Fields("Description"
= Request.Form("strItemDesc" & i)
.Update
i = i + 1
wend
end with
set rsPOD = nothing
%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
</HEAD>
<BODY>
<H1>UPDATE COMPLETE</H1>
</BODY>
</HTML>
The error is as follows:
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Errors occurred
/TestProject/LD1PurchOrdAdd.asp, line 60
Line 60 refers to the line where the Description field is being updated in the rsPOD recordset. I cannot find any other problems with this code.
As another aside and as I mentioned in last night's post, I came across something in the MS KnowledgeBase that I thought might be related (Knowledge Base ID = Q261297), but when I tried testing this morning, it seemed to create a never-ending loop until I cut it off. It's not included as part of the code pasted above. If anyone has any suggestions, they are greatly appreciated! Thanks!