 |
| Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

February 23rd, 2005, 10:37 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Displaying âSQL TEXT Columnâ in ASP
Hi All,
I have a test column in a SQL table and I am displaying in a frame in ASP.
I get a problem when there is a â#â sign in the text. It doesnât display anything after the â#â sign along with the â#â sign. But, it display fine in âTextAreaâ element.
I am also trying to give some nice style to âTextâ. Such as, âBoldâ, âIndentationâ, â
âBullet Pointsâ and etc. How can I implement these options with the âTEXT COLUMNâ
in a SQL table and display the result page in ASP.
Thank you
:)
MCinar
Love all the creatures because of the creator.
__________________
MCinar
Love all the creatures because of the creator.
|
|

February 23rd, 2005, 12:58 PM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
Hi,
can u paste the code..
Om Prakash
|
|

February 23rd, 2005, 01:06 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Hi om_prakash,
here is my code;
<%
sub display_billing_instruction%>
<div id="display_bi" width ="1006px" style="position:absolute; z-index:12; left: 10px; top: 168px;">
<table border="0" rules="NONE">
<tr>
<td class=td3 style="background-color:#000099; color=#FFFFFF;">DIRECT BILLING INSTRUCTION</td>
</tr>
</table>
</div>
<div id="billing_instruction" width ="1006px" style="position:absolute; z-index:13; left: 10px; top: 190px;">
<!--
<iframe frameborder="1" name="content" width="1000px" height="200px"
marginheight="5" marginwidth="5" scrolling="yes" src="display_billing_instruction.asp?Corp_ID=<%=ln gCorpID%>">
</iframe> -->
<iframe frameborder="1" name="content" width="1006px" height="100px" marginheight="0" marginwidth="1"
scrolling="yes" src="display_billing_instruction.asp?Corp_ID=<%=ln gCorpID%>&Bill_Instruction=<%=strBillingInstructio n%>">
</iframe>
</div>
<%end sub%>
<%@language="vbscript"%>
<%option explicit%>
<html>
<head>
</head>
<body>
<%
dim lngCorpID, strBillingInstruction
if len(trim(request("Corp_ID"))) then
lngCorpID = trim(request("Corp_ID"))
' Get Billing Instruction
' call get_billing_instruction
end if
if len(trim(request("Bill_Instruction"))) then
strBillingInstruction = trim(request("Bill_Instruction"))
' Display_corp_address
call display_billing_instruction
end if
%>
</body>
</html>
<%sub get_billing_instruction
dim cn, rs, strSQL
set cn = server.CreateObject("adodb.connection")
cn.Open strConn
strSQL = "sp_ParmSel_BillingInstruction @CorpID =" & clng(lngCorpID)
' Execute
set rs = cn.Execute(strSQL)
if not rs.eof then
strBillingInstruction = rs("Billing_Instruction_TX")
' display_billing_instruction
call display_billing_instruction
end if
set cn = nothing
set rs = nothing
end sub%>
<%
sub display_billing_instruction%>
<table width="982px" cellspacing="0" cellpadding="0" border="0">
<tr>
<td colspan="2" align="left">
<%=strBillingInstruction%>
</td>
</tr>
</table>
<%end sub%>
Thank you,
MCinar
Love all the creatures because of the creator.
|
|

February 23rd, 2005, 03:20 PM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
I think this is causing problem:
<iframe frameborder="1" name="content" width="1006px" height="100px" marginheight="0" marginwidth="1"
scrolling="yes" src="display_billing_instruction.asp?Corp_ID=<%=ln gCorpID%>&Bill_Instruction=<%=strBillingInstructio n%>">
Encode <%=strBillingInstruction%> string before attaching this to URL.
Om Prakash
|
|

February 23rd, 2005, 04:15 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
What do you recommend for encoding in a "TEXT Column"?
Thanks,
MCinar
Love all the creatures because of the creator.
|
|

February 23rd, 2005, 04:35 PM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
scrolling="yes" src="display_billing_instruction.asp?Corp_ID=<%=ln gCorpID%>&Bill_Instruction=<%=server.URLEncode(str BillingInstruction)%>">
Om Prakash
|
|

February 23rd, 2005, 05:06 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
It didn't make a difference.
MCinar
Love all the creatures because of the creator.
|
|

February 23rd, 2005, 06:03 PM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
You hace defined 2 sub "display_billing_instruction", which one u r using?
Om Prakash
|
|

February 23rd, 2005, 06:11 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
|
|
Om
I now fix the first one and it is working.
Thanks.
I also had another question regarding to this TEXT column.
I am also trying to give some nice style to âTextâ. Such as, âBoldâ, âIndentationâ, â
âBullet Pointsâ and etc. How can I implement these options with the âTEXT COLUMNâ
in a SQL table and display the result page in ASP.
Any recommendation?
Thanks again.
MCinar
Love all the creatures because of the creator.
|
|

February 23rd, 2005, 06:34 PM
|
|
Friend of Wrox
|
|
Join Date: May 2004
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
|
|
Hi,
Please check the following article for the operations that can be performed in TEXT data type in SQL server..
http://www.samspublishing.com/articl...31453&seqNum=3
Om Prakash
|
|
 |