string literal too long is the error I'm getting by using this code. I'm assuming this is because I'm creating a huge SQL statment. Is that the problem? IF so does anyone know how I could fix this? Thanks for taking the time to read, it's really appreciated.
do while icounter <= ubound(arrwords)
invalues = invalues & arrwords(icounter)
icounter = icounter + 1
if icounter = ubound(arrwords) then
tempSql = tempSql & strSQL & " AND band_reserve.reserve_number IN ('" & invalues & "')"
elseif counter = 253 then
tempSql = tempSql & strSQL & " AND band_reserve.reserve_number IN ('" & invalues & "') union "
invalues = ""
counter = 0
end if
counter = counter + 1
loop
do while icounter <= ubound(arrwords)
invalues = invalues & arrwords(icounter)
icounter = icounter + 1
if icounter = ubound(arrwords) then
tempSql = tempSql & strSQL & " AND band_reserve.reserve_number IN ('" & invalues & "')"
elseif counter = 253 then
tempSql = tempSql & strSQL & " AND band_reserve.reserve_number IN ('" & invalues & "') union "
invalues = ""
counter = 0
end if
counter = counter + 1
loop