I am running this select statement against my MSSQL Database and some of the data is empty. When I running it in SQL Query - I see the data just fine. But in my ASP Page - nothing.
In particular - questioname right now. Although, I had problems with each and every one of my fields below questionname.
This code worked 100% fine against my MySQL Database - but not the MSSQL.
Please help -
Code:connstr="DSN=survey;UID=username;PWD=password" set conn=server.CreateObject("ADODB.Connection") conn.ConnectionTimeout=60 conn.open=connstr sql="select id, [question] as questionname, [header] as hr, [row] as rowrow, questionno, keyword, maxanswers from eventsurveyquestion where survey='W' and id<>36 order by questionno, row" set res=conn.Execute(sql) do while not res.eof headerinfo = cstr(res("hr")) questionname = cstr(res("questionname")) lettername = cstr(res("rowrow") ) questionno = res("questionno") response.write questionname & "<BR>" res.movenext loop res.close conn.close




Reply With Quote