I have a web service using a iDB2 connection to return a Data Set. I am searching a large table on a partial string to find a portion of a serial number, I kept getting this SQL0666 error so I had a new LF created over the file on the i-Series side by the text field I am searching on and it now runs in a second. My problem is it works fine over the TEST data with 14 million rows. When I change this SQL string to point to the LIVE database with 15 million rows the error comes back. I read the other post about setting the timeout to *nomax but did not see it as part of the connection.
strSQL = "SELECT O5ORD#,O5BTKY,ODTEXT,OHSM FROM livedta032.O5M01 "
strSQL &= "JOIN OHP ON O5ORD# = OHORD# "
strSQL &= "WHERE ODTEXT Like " & "'" & "%" & strSerialNumber & "%" & "'" & " AND O5BTKY = " & "'" & strCustomerNumber & "'" & " "
Dim myConnection As New iDB2Connection(strConnection)
Dim da As New iDB2DataAdapter(strSQL, myConnection)
Dim dsOrders As New DataSet()