ASP code not reading SQL field correctly

Ikd2lsmdSl

New Member
I'm pulling a field from a table and doing different things depending on what the result is. Here's my code\[code\]<%stringA ="Select field From table Where something=1"set response = connFW.Execute(stringA )set result = response ("field")If result ="y" Then Response.Write("The field is: " & result )End If%>\[/code\]It outputs this:\[code\]The field is: y\[/code\]Then, later, I have an If statement:\[code\]<% ElseIf result ="y" or Session("customer_id") <> "" ThenDo Something%>\[/code\]But it never executes what's in the ElseIf statement! It says right at the top of the page that it gave the correct result! Am I missing something?Note: To avoid confusion, this code is at the top of the page:\[code\]Set connFW = Server.CreateObject("ADODB.Connection")connFW.ConnectionTimeout = Application("FW_ConnectionTimeout")connFW.CommandTimeout = Application("FW_CommandTimeout")connFW.Open Application("FW_ConnectionString")\[/code\]
 
Back
Top