Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
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
 
Old February 23rd, 2005, 10:37 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default 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.
 
Old February 23rd, 2005, 12:58 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

Hi,
 can u paste the code..

Om Prakash
 
Old February 23rd, 2005, 01:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
 
Old February 23rd, 2005, 03:20 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

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
 
Old February 23rd, 2005, 04:15 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

What do you recommend for encoding in a "TEXT Column"?

Thanks,


MCinar

Love all the creatures because of the creator.
 
Old February 23rd, 2005, 04:35 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

scrolling="yes" src="display_billing_instruction.asp?Corp_ID=<%=ln gCorpID%>&Bill_Instruction=<%=server.URLEncode(str BillingInstruction)%>">


Om Prakash
 
Old February 23rd, 2005, 05:06 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

It didn't make a difference.

MCinar

Love all the creatures because of the creator.
 
Old February 23rd, 2005, 06:03 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

You hace defined 2 sub "display_billing_instruction", which one u r using?


Om Prakash
 
Old February 23rd, 2005, 06:11 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: , NY, USA.
Posts: 141
Thanks: 1
Thanked 0 Times in 0 Posts
Default

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.
 
Old February 23rd, 2005, 06:34 PM
Friend of Wrox
Points: 2,473, Level: 20
Points: 2,473, Level: 20 Points: 2,473, Level: 20 Points: 2,473, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: May 2004
Location: India
Posts: 642
Thanks: 0
Thanked 43 Times in 42 Posts
Default

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




Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying Text using CSS austinf CSS Cascading Style Sheets 3 October 11th, 2007 02:58 PM
Displaying text in textbox Europom Excel VBA 4 March 31st, 2007 06:28 AM
displaying variable in normal text yuvin ASP.NET 1.0 and 1.1 Basics 5 January 12th, 2007 02:03 AM
Displaying binarydata as text audio-catalyst Classic ASP Professional 0 December 17th, 2005 06:30 AM
Displaying text depending on the value of a field lguzman Access VBA 1 May 30th, 2004 06:14 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.