So show your *REAL* code. The stuff that does NOT work. It's pointless to ask us a question about code that *does* work.
I can suggest a few possible causes of your problem, but there's no point until I see real code.
No...I will give you one *possible* hint right now. Just in case. But don't be surprised if it's irrelevant.
(1) Only SELECT the fields you actually need (in your SQL); don't use SELECT *
(2) Make sure you SELECT any TEXT or NTEXT fields *LAST*, after all the other types of fields.
(3) Make sure you assign the value of any TEXT or NTEXT field to a variable only *ONCE*, and then if you need to test or use the value multiple times, test/use the variable, not the RS("xxx") value.
In other words:
<%
Set RS = conn.Execute("SELECT numfield, datefield, NTEXTfield FROM table")
Do Until RS.EOF
numval = RS("numfield")
dateval = RS("datefield")
textval = RS("NTEXTfield")
If InStr( textval, "zamboni" ) Then
Response.Write textval
End If
RS.MoveNext
Loop
%>
You see it? Under *some* circumstances, getting a long text field from the RS can then "hide" other values in the same record. And in any case, getting a long text field more than once can be problematic. Copying *ALL* values from the RS to local variables will, in general, only HELP performance anyway, so why not do it?
|