Using classic asp, I am trying to query a SQL Server database as follows:
strSQL = "select column_1, column_2, column_3, column_4 from someview " &_
"where RecordNo=" & i
set rs=conn.Execute(strSQL)
if not rs.eof then
A = rs("column_1")
B = rs("column_2")
C = rs("column_3")
D = rs("column_4")
end if
Column_3 is an NText type, other columns are varchar or int (sometimes there can be more than four columns), but the query returns only 1 record due to the where clause.
On the ASP page, the results change - sometimes A, B, D are filled, sometimes not - but all the columns in the view contain data (when I query SQL Server, I see the expected results - all the columns contain data) If I delete column_3, which is NText from strSQL, everything works fine.
I have seen this behavior on several other pages in the past. If I modify ASP to get column_3 separately:
strSQL = "select column_3 from someview where RecordNo=" & i
NText data will return correctly.
SQL Server, ASP? NTEXT , - , ?
EDIT: , - ODBC SQL Server ( = {SQL Server};).