Ask a Question related to ASP Database, Design and Development.
-
Shimon #1
Code problem
Does anyone know what the problem with this code is:
<% If NOT(rs_shiurim("Daily") = "") Then %>
<tr>
<td width="13%"><strong>DAILY</strong></td>
<td width="87%"><%=rs_shiurim("Daily")%></td>
</tr>
It only prints "DAILY" when the string is NOT ""
Thanks
Shimon
Shimon Guest
-
Problem with JScript code
My homepage has 3 layers. Two layers have this sample script. The script is supposed to force open Explorer flash able to render the flash file.... -
Code Problem (again)
Here we go again. I am trying to populate an array of objects and assign it to a data slot in application.onAppStart. This is my code: //-----... -
Problem with asp code
i don't have any idea of how to get the content or information of other web site using asp code. if you guys have any solution please share with me ... -
Problem with a code
Hello, I have this code: <?php $fpload = fopen(''.$ziel.'', 'r'); $fpsave = fopen(''.$endname.'', 'w'); if ($fpload && $fpsave) { while... -
Security problem with Managed Code calling Unmanaged Code in a Web Page
Hello, I have a web page which contains an ActiveX control (unmanaged) and a Windows Forms User Control (managed). Both reside on a web page and... -
Ray at #2
Re: Code problem
That's what it's supposed to do. You have NOT = "". Look at it like this.
<%
sValue = rs_shiurim.FIELDS.ITEM("Daily").VALUE
bIsEmpty = sValue = ""
If Not bIsEmpty Then %>
<tr....
<% End If %>
So, if sValue is "", then bEmpty is true, right? If it's empty, it is NOT
"" and bEmpty is false. So,
If not FALSE Then
'NOT FALSE = TRUE, SO CODE WILL EXECUTE
Ray at work
"Shimon" <shimon@iafrica.com> wrote in message
news:0b2f01c3af43$50c89c60$a301280a@phx.gbl...> Does anyone know what the problem with this code is:
>
> <% If NOT(rs_shiurim("Daily") = "") Then %>
> <tr>
> <td width="13%"><strong>DAILY</strong></td>
> <td width="87%"><%=rs_shiurim("Daily")%></td>
> </tr>
>
> It only prints "DAILY" when the string is NOT ""
>
> Thanks
> Shimon
>
Ray at Guest
-
Jeff Cochran #3
Re: Code problem
On Thu, 20 Nov 2003 00:50:14 -0800, "Shimon" <shimon@iafrica.com>
wrote:
Do a Response.Write on the string to see what actually *is* there.>Does anyone know what the problem with this code is:
>
> <% If NOT(rs_shiurim("Daily") = "") Then %>
> <tr>
> <td width="13%"><strong>DAILY</strong></td>
> <td width="87%"><%=rs_shiurim("Daily")%></td>
> </tr>
>
>It only prints "DAILY" when the string is NOT ""
Jeff
Jeff Cochran Guest
-
McKirahan #4
Re: Code problem
You have a misplaced parenthesis; try:
<% If NOT(rs_shiurim("Daily")) = "" Then %>
"Shimon" <shimon@iafrica.com> wrote in message
news:0b2f01c3af43$50c89c60$a301280a@phx.gbl...> Does anyone know what the problem with this code is:
>
> <% If NOT(rs_shiurim("Daily") = "") Then %>
> <tr>
> <td width="13%"><strong>DAILY</strong></td>
> <td width="87%"><%=rs_shiurim("Daily")%></td>
> </tr>
>
> It only prints "DAILY" when the string is NOT ""
>
> Thanks
> Shimon
McKirahan Guest
-
Shimon #5
Code Problem
I can't figure out why this code segment will not print
line 4 if the condition is true.
1 <%If NOT IsNull(rs_shiurim("Tuesday")) Then %>
2 <tr>
3 <td width="13%"><strong>Tuesday</strong></td>
4 <td width="87%"><%=rs_shiurim("Tuesday")%></td>
5 </tr>
6 <% End If %>
Line 2, 3 and 5 are printed. rs_shiurim is a recordset
generated from a SQL quesy to an Access DB.
Thanks
Shimon
Shimon Guest
-
TomB #6
Re: Code Problem
Perhaps rs_shiurim("Tuesday") is not null, but it is empty.
I've never had much faith in isNull and prefer to use....
if len(rs_shiurim("Tuesday") & "")=0 then
'rs_shiurim("Tuesday")is either null or empty
else
'rs_shiurim("Tuesday") contains something
end if
"Shimon" <shimon@iafrica.com> wrote in message
news:087901c3b4e3$b7972e20$a501280a@phx.gbl...> I can't figure out why this code segment will not print
> line 4 if the condition is true.
>
> 1 <%If NOT IsNull(rs_shiurim("Tuesday")) Then %>
> 2 <tr>
> 3 <td width="13%"><strong>Tuesday</strong></td>
> 4 <td width="87%"><%=rs_shiurim("Tuesday")%></td>
> 5 </tr>
> 6 <% End If %>
>
> Line 2, 3 and 5 are printed. rs_shiurim is a recordset
> generated from a SQL quesy to an Access DB.
> Thanks
> Shimon
TomB Guest
-
Phillip Windell #7
Re: Code Problem
"Shimon" <shimon@iafrica.com> wrote in message
news:087901c3b4e3$b7972e20$a501280a@phx.gbl...It can't print without "Response.write", and you have to change the> I can't figure out why this code segment will not print
> line 4 if the condition is true.
>
> 1 <%If NOT IsNull(rs_shiurim("Tuesday")) Then %>
> 2 <tr>
> 3 <td width="13%"><strong>Tuesday</strong></td>
> 4 <td width="87%"><%=rs_shiurim("Tuesday")%></td>
> 5 </tr>
> 6 <% End If %>
way the rs_shiurim is concatenated to go along with that. Like this:
Response.Write "<td width="87%">" & rs_shiurim("Tuesday") & "</td>"
I would also change the double quotes around the HTML values the
single quotes so they don't interferre with the double quotes used
with Response.Write. You could even put rs_shiurim on a line by
itself if that helps readability,...in the end it will all be on one
line in the resulting HTML.
<%If NOT IsNull(rs_shiurim("Tuesday")) Then %>
Response.write "<tr>"
Response.write "<td width='13%'><strong>Tuesday</strong></td>"
Response.write "<td width='87%'>"
Response.write rs_shiurim("Tuesday")
Response.write "</td></tr>"
<% End If %>
--
Phillip Windell [CCNA, MVP, MCP]
WAND-TV (ABC Affiliate)
[url]www.wandtv.com[/url]
Phillip Windell Guest
-
TomB #8
Re: Code Problem
<td width="87%"><%=rs_shiurim("Tuesday")%></td>
the <%= is the same as Response.write so that part is fine.
"Phillip Windell" <none> wrote in message
news:OKKi11EuDHA.2132@TK2MSFTNGP10.phx.gbl...> "Shimon" <shimon@iafrica.com> wrote in message
> news:087901c3b4e3$b7972e20$a501280a@phx.gbl...>> > I can't figure out why this code segment will not print
> > line 4 if the condition is true.
> >
> > 1 <%If NOT IsNull(rs_shiurim("Tuesday")) Then %>
> > 2 <tr>
> > 3 <td width="13%"><strong>Tuesday</strong></td>
> > 4 <td width="87%"><%=rs_shiurim("Tuesday")%></td>
> > 5 </tr>
> > 6 <% End If %>
> It can't print without "Response.write", and you have to change the
> way the rs_shiurim is concatenated to go along with that. Like this:
>
> Response.Write "<td width="87%">" & rs_shiurim("Tuesday") & "</td>"
>
> I would also change the double quotes around the HTML values the
> single quotes so they don't interferre with the double quotes used
> with Response.Write. You could even put rs_shiurim on a line by
> itself if that helps readability,...in the end it will all be on one
> line in the resulting HTML.
>
> <%If NOT IsNull(rs_shiurim("Tuesday")) Then %>
> Response.write "<tr>"
> Response.write "<td width='13%'><strong>Tuesday</strong></td>"
> Response.write "<td width='87%'>"
> Response.write rs_shiurim("Tuesday")
> Response.write "</td></tr>"
> <% End If %>
>
> --
>
> Phillip Windell [CCNA, MVP, MCP]
> WAND-TV (ABC Affiliate)
> [url]www.wandtv.com[/url]
>
>
TomB Guest
-
Phillip Windell #9
Re: Code Problem
"TomB" <shuckle@hotmail.com> wrote in message
news:uagWGCFuDHA.2208@TK2MSFTNGP10.phx.gbl...Yes. I was thinking that the whole thing was inside the <%....%>> <td width="87%"><%=rs_shiurim("Tuesday")%></td>
>
> the <%= is the same as Response.write so that part is fine.
instead of outside of the tags as raw html with simply the <%=.....%>
inserted where needed.
--
Phillip Windell [CCNA, MVP, MCP]
WAND-TV (ABC Affiliate)
[url]www.wandtv.com[/url]
Phillip Windell Guest
-
Simeon Shapiro #10
Re: Code Problem
Seems the only to code to work is as follows:
Dim sData
sData = CStr(rs_shiurim("Tuesday"))
If sData <> "" Then
Response.Write("<tr><td><strong>" & header)
Reponse.Write("</strong></td><td>" & sData)
Response.Write("</td></tr>")
End If
Thanks
Shimon
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Simeon Shapiro Guest
-
Mark Schupp #11
Re: Code Problem
does the data column happen to be of long varchar (memo) type?
if so this is an old fairly well-documented problem and the work-around is
to use a local variable as you have.
--
Mark Schupp
Head of Development
Integrity eLearning
[url]www.ielearning.com[/url]
"Simeon Shapiro" <shimon@iafrica.com> wrote in message
news:OHDQEmduDHA.2440@TK2MSFTNGP12.phx.gbl...> Seems the only to code to work is as follows:
> Dim sData
> sData = CStr(rs_shiurim("Tuesday"))
> If sData <> "" Then
> Response.Write("<tr><td><strong>" & header)
> Reponse.Write("</strong></td><td>" & sData)
> Response.Write("</td></tr>")
> End If
>
> Thanks
> Shimon
>
>
>
> *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
> Don't just participate in USENET...get rewarded for it!
Mark Schupp Guest
-
Simeon Shapiro #12
Re: Code Problem
Yes. It's a memo type variable.
Where would one find such documented problems?
Thanks
Shimon
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Simeon Shapiro Guest
-
Bob Barrows #13
Re: Code Problem
Simeon Shapiro wrote:
[url]www.aspfaq.com[/url]> Yes. It's a memo type variable.
> Where would one find such documented problems?
>
Bob
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows Guest



Reply With Quote

