Hi all, I have a table with info I need to update into two tables - I've done this with one table no problem every time. But the two are giving me a headache - I'll get errors such as
+++++
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/financeeditallb2.asp, line 92
++++++
here is the code - thank you in advance for your time.
<%
set rsResults = Server.CreateObject("ADODB.Recordset"
rsResults.ActiveConnection = MM_my_STRING
rsResults.Source = "SELECT * FROM tblOne"
rsResults.CursorType = 3
rsResults.CursorLocation = 2
rsResults.LockType = 3
rsResults.Open()
rsResults_numRows = 0
%>
<%
set rsCustomer = Server.CreateObject("ADODB.Recordset"
rsCustomer.ActiveConnection = MM_my_STRING
rsCustomer.Source = "SELECT * FROM tbltwo"
rsCustomer.CursorType = 3
rsCustomer.CursorLocation = 2
rsCustomer.LockType = 3
rsCustomer.Open()
rsCustomer_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsResults_numRows = rsResults_numRows + Repeat1__numRows
%>
<%
if request("Submit"
<> "" Then
rsCustomer.MoveFirst
fldCustIDArray=Split(Request("txtCustID"
,","
fldCustNameArray=split(Request("txtCustName"
,","
fldCustAddressarray=split(Request("txtCustAddress"
,","
fldCustCityarray=split(Request("txtCustCity"
,","
fldCuststatearray=split(Request("txtCustState"
,","
fldCustZiparray=split(Request("txtCustZip"
,","
fldCustPhone1array=split(Request("txtCustPhone1"
,","
fldCustPhone2array=split(Request("txtCustPhone2"
,","
fldCustEmailarray=split(Request("txtCustEmail"
,","
for i=0 to ubound(fldCustNamearray)
rsCustomer("CustID"
=trim(fldCustIDarray(i))
rsCustomer("fldCustname"
=trim(fldCustNamearray(i))
rsCustomer("fldCustAddress"
=trim(fldCustAddressarray(i))
rsCustomer("fldCustCity"
=trim(fldCustCityarray(i))
rsCustomer("fldCustState"
=trim(fldCustStatearray(i))
rsCustomer("fldCustZip"
=trim(fldCustZiparray(i))
rsCustomer("fldCustPhone1"
=trim(fldCustPhone1array(i))
rsCustomer("fldCustPhone2"
=trim(fldCustPhone2array(i))
rsCustomer("fldEmail"
=trim(fldCustEmailarray(i))
rsCustomer.update
rsCustomer.Movenext
next
end if
%>
<%
if request("Submit"
<> "" Then
rsResults.MoveFirst
fldDateSoldarray=split(Request("txtDateSold"
,","
fldtypearray=split(Request("txttype"
,","
fldStockNumberarray=split(Request("txtStockNumber"
,","
fldCommentsarray=split(Request("txtComments"
,","
fldMakeArray=split(Request("txtMake"
,","
fldVINArray=split(Request("txtVIN"
,","
fldModelyearArray=split(Request("txtModelYear"
,","
fldSalePricearray=split(Request("txtSalePrice"
,","
fldModelarray=split(Request("txtModel"
,","
for i=0 to ubound(fldDateSoldarray)
rsResults("fldDateSold"
=trim(fldDateSoldarray(i))
rsResults("fldType"
=trim(fldTypearray(i))
rsResults("fldStockNumber"
=trim(fldStockNumberarray(i))
rsResults("fldComments"
=trim(fldCommentsarray(i))
rsResults("fldMake"
=trim(fldMakearray(i))
rsResults("fldVIN"
=trim(fldVINarray(i))
rsResults("fldModelYear"
=trim(fldModelYeararray(i))
rsResults("fldSalePrice"
=trim(fldSalePricearray(i))
rsResults("fldModel"
=trim(fldModelarray(i))
rsResults.update
rsResults.Movenext
next
response.redirect "anotherpage.asp"
End if
%>
"Damn the torpedoes, full speed ahead!"
-Adm. James Farragut
Stuart
+++++
Microsoft OLE DB Provider for ODBC Drivers error '80040e21'
Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
/financeeditallb2.asp, line 92
++++++
here is the code - thank you in advance for your time.
<%
set rsResults = Server.CreateObject("ADODB.Recordset"
rsResults.ActiveConnection = MM_my_STRING
rsResults.Source = "SELECT * FROM tblOne"
rsResults.CursorType = 3
rsResults.CursorLocation = 2
rsResults.LockType = 3
rsResults.Open()
rsResults_numRows = 0
%>
<%
set rsCustomer = Server.CreateObject("ADODB.Recordset"
rsCustomer.ActiveConnection = MM_my_STRING
rsCustomer.Source = "SELECT * FROM tbltwo"
rsCustomer.CursorType = 3
rsCustomer.CursorLocation = 2
rsCustomer.LockType = 3
rsCustomer.Open()
rsCustomer_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsResults_numRows = rsResults_numRows + Repeat1__numRows
%>
<%
if request("Submit"
rsCustomer.MoveFirst
fldCustIDArray=Split(Request("txtCustID"
fldCustNameArray=split(Request("txtCustName"
fldCustAddressarray=split(Request("txtCustAddress"
fldCustCityarray=split(Request("txtCustCity"
fldCuststatearray=split(Request("txtCustState"
fldCustZiparray=split(Request("txtCustZip"
fldCustPhone1array=split(Request("txtCustPhone1"
fldCustPhone2array=split(Request("txtCustPhone2"
fldCustEmailarray=split(Request("txtCustEmail"
for i=0 to ubound(fldCustNamearray)
rsCustomer("CustID"
rsCustomer("fldCustname"
rsCustomer("fldCustAddress"
rsCustomer("fldCustCity"
rsCustomer("fldCustState"
rsCustomer("fldCustZip"
rsCustomer("fldCustPhone1"
rsCustomer("fldCustPhone2"
rsCustomer("fldEmail"
rsCustomer.update
rsCustomer.Movenext
next
end if
%>
<%
if request("Submit"
rsResults.MoveFirst
fldDateSoldarray=split(Request("txtDateSold"
fldtypearray=split(Request("txttype"
fldStockNumberarray=split(Request("txtStockNumber"
fldCommentsarray=split(Request("txtComments"
fldMakeArray=split(Request("txtMake"
fldVINArray=split(Request("txtVIN"
fldModelyearArray=split(Request("txtModelYear"
fldSalePricearray=split(Request("txtSalePrice"
fldModelarray=split(Request("txtModel"
for i=0 to ubound(fldDateSoldarray)
rsResults("fldDateSold"
rsResults("fldType"
rsResults("fldStockNumber"
rsResults("fldComments"
rsResults("fldMake"
rsResults("fldVIN"
rsResults("fldModelYear"
rsResults("fldSalePrice"
rsResults("fldModel"
rsResults.update
rsResults.Movenext
next
response.redirect "anotherpage.asp"
End if
%>
"Damn the torpedoes, full speed ahead!"
-Adm. James Farragut
Stuart