B
bcap
Hi,
I have written the below update statement and it works fine if there
are multiple records in my recordset, but if there is just one single
record it will not update that one record. Any ideas to what I am
doing wrong or need to do right? =)
dim id
dim xx
if uBound(DID) = 0 then
xx=1
else
xx=0
end if
for id=xx to uBound(DID)
sql_update = "update " & t_maintable & ""
sql_update = sql_update & " SET "',"
sql_update = sql_update & "ConLetDt='" & trim(ConLetDt(id)) &
"',"
sql_update = sql_update & "PID='" & trim(PID(id)) & "',"
sql_update = sql_update & "SID='" & trim(SID(id)) & "',"
sql_update = sql_update & "RespDt='" & trim(RespDt(id)) & "',"
sql_update = sql_update & "TVal='" & trim(TVal(id)) & "',"
sql_update = sql_update & "PSExportDt='" & trim(PSExportDt(id)) &
"',"
sql_update = sql_update & "dShipInd='" & trim(dShipInd(id)) &
"',"
sql_update = sql_update & "ShipRefNo='" & trim(ShipRefNo(id)) &
"'"
sql_update = sql_update & "WHERE DID =" & DID(id)
conn1.Execute sql_update,,129
Thank you in advance!!!!!!!
I have written the below update statement and it works fine if there
are multiple records in my recordset, but if there is just one single
record it will not update that one record. Any ideas to what I am
doing wrong or need to do right? =)
dim id
dim xx
if uBound(DID) = 0 then
xx=1
else
xx=0
end if
for id=xx to uBound(DID)
sql_update = "update " & t_maintable & ""
sql_update = sql_update & " SET "',"
sql_update = sql_update & "ConLetDt='" & trim(ConLetDt(id)) &
"',"
sql_update = sql_update & "PID='" & trim(PID(id)) & "',"
sql_update = sql_update & "SID='" & trim(SID(id)) & "',"
sql_update = sql_update & "RespDt='" & trim(RespDt(id)) & "',"
sql_update = sql_update & "TVal='" & trim(TVal(id)) & "',"
sql_update = sql_update & "PSExportDt='" & trim(PSExportDt(id)) &
"',"
sql_update = sql_update & "dShipInd='" & trim(dShipInd(id)) &
"',"
sql_update = sql_update & "ShipRefNo='" & trim(ShipRefNo(id)) &
"'"
sql_update = sql_update & "WHERE DID =" & DID(id)
conn1.Execute sql_update,,129
Thank you in advance!!!!!!!