Response.write statement does not work properly
am 16.12.2004 00:13:02 von jack
Hi,
I am building a very small ASP page. I would like to check for
the result of the sql statement in the page before opening
the recordset. However, when I am running the page, it gives
False as Response.write value of the sql statement. I have
no idea why this is happening. Thanks in advance.
CODE:
<%@ Language=VBScript %>
This is the new approach to GWIS application
<%
myDSN="DRIVER={Microsoft Access Driver (*.mdb)}; "
myDSN=myDSN & "DBQ=C:\_______GWISNEWCON\GMISDATA.mdb"
set CN=server.createobject("ADODB.Connection")
CN.Open myDSN
set RS=server.createobject("ADODB.Recordset")
strsql = "SELECT tblGMISSpecialConditions.IntID,
tblGMISSpecialConditions.ConditionNumber, " & _
strsql = "tblGMISSpecialConditions.ShortDesc,
tblGMISSpecialConditions.ConditionText, " & _
strsql = "FROM tblGMISSpecialConditions;"
Response.Write strsql
'RS.Open SQL,2, 2
%>
Re: Response.write statement does not work properly
am 16.12.2004 00:52:59 von Mark Schupp
Your assignment statement is being evaluated as a boolean expression due to
the " strsql =" fragments included in the concatenation.
Either use:
strsql = "SELECT tblGMISSpecialConditions.IntID,
tblGMISSpecialConditions.ConditionNumber, "
strsql = strsql & "tblGMISSpecialConditions.ShortDesc,
tblGMISSpecialConditions.ConditionText, "
strsql = strsql & "FROM tblGMISSpecialConditions;"
or
strsql = "SELECT tblGMISSpecialConditions.IntID,
tblGMISSpecialConditions.ConditionNumber, " & _
"tblGMISSpecialConditions.ShortDesc,
tblGMISSpecialConditions.ConditionText, " & _
"FROM tblGMISSpecialConditions;"
--
--Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Jack" wrote in message
news:A8109605-8982-4DCD-9202-B57A1E28D22C@microsoft.com...
> Hi,
> I am building a very small ASP page. I would like to check for
> the result of the sql statement in the page before opening
> the recordset. However, when I am running the page, it gives
> False as Response.write value of the sql statement. I have
> no idea why this is happening. Thanks in advance.
>
> CODE:
> <%@ Language=VBScript %>
>
>
>
>
> This is the new approach to GWIS application
>
>
>
> <%
> myDSN="DRIVER={Microsoft Access Driver (*.mdb)}; "
> myDSN=myDSN & "DBQ=C:\_______GWISNEWCON\GMISDATA.mdb"
>
> set CN=server.createobject("ADODB.Connection")
> CN.Open myDSN
> set RS=server.createobject("ADODB.Recordset")
>
>
> strsql = "SELECT tblGMISSpecialConditions.IntID,
> tblGMISSpecialConditions.ConditionNumber, " & _
> strsql = "tblGMISSpecialConditions.ShortDesc,
> tblGMISSpecialConditions.ConditionText, " & _
> strsql = "FROM tblGMISSpecialConditions;"
>
> Response.Write strsql
>
> 'RS.Open SQL,2, 2
>
> %>
>
>
>
>
>
>
>
Re: Response.write statement does not work properly
am 16.12.2004 17:07:02 von jack
Thanks here again Mark. It was some kind of overlook on my part here. I
appreciate your help.
"Mark Schupp" wrote:
> Your assignment statement is being evaluated as a boolean expression due to
> the " strsql =" fragments included in the concatenation.
>
> Either use:
> strsql = "SELECT tblGMISSpecialConditions.IntID,
> tblGMISSpecialConditions.ConditionNumber, "
> strsql = strsql & "tblGMISSpecialConditions.ShortDesc,
> tblGMISSpecialConditions.ConditionText, "
> strsql = strsql & "FROM tblGMISSpecialConditions;"
> or
> strsql = "SELECT tblGMISSpecialConditions.IntID,
> tblGMISSpecialConditions.ConditionNumber, " & _
> "tblGMISSpecialConditions.ShortDesc,
> tblGMISSpecialConditions.ConditionText, " & _
> "FROM tblGMISSpecialConditions;"
>
>
>
>
> --
> --Mark Schupp
> Head of Development
> Integrity eLearning
> www.ielearning.com
>
> "Jack" wrote in message
> news:A8109605-8982-4DCD-9202-B57A1E28D22C@microsoft.com...
> > Hi,
> > I am building a very small ASP page. I would like to check for
> > the result of the sql statement in the page before opening
> > the recordset. However, when I am running the page, it gives
> > False as Response.write value of the sql statement. I have
> > no idea why this is happening. Thanks in advance.
> >
> > CODE:
> > <%@ Language=VBScript %>
> >
> >
> >
> >
> > This is the new approach to GWIS application
> >
> >
> >
> > <%
> > myDSN="DRIVER={Microsoft Access Driver (*.mdb)}; "
> > myDSN=myDSN & "DBQ=C:\_______GWISNEWCON\GMISDATA.mdb"
> >
> > set CN=server.createobject("ADODB.Connection")
> > CN.Open myDSN
> > set RS=server.createobject("ADODB.Recordset")
> >
> >
> > strsql = "SELECT tblGMISSpecialConditions.IntID,
> > tblGMISSpecialConditions.ConditionNumber, " & _
> > strsql = "tblGMISSpecialConditions.ShortDesc,
> > tblGMISSpecialConditions.ConditionText, " & _
> > strsql = "FROM tblGMISSpecialConditions;"
> >
> > Response.Write strsql
> >
> > 'RS.Open SQL,2, 2
> >
> > %>
> >
> >
> >
> >
> >
> >
> >
>
>
>