Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

trouble displaying mssql text datatype on web page

Posted on 1998-10-10
7
Medium Priority
?
302 Views
Last Modified: 2013-12-25
When I store text in a text datatype in mssql, I have trouble retrieving that data on the web.  I'm using the
following query in an asp page:

strLnk = "Select link_name, link_id, link_body, Link_url from links where link_id = " & linkID
Set RSLNK = TIADB.Execute(strLnk)

later in the page, I want to get the link_body to display
in a textarea:

<textarea rows="4" cols="52" wrap="on">
<%= RSLNK("link_body") %></textarea>

I can get other datatypes out of the same table with
this query.  but the text data types do not display.
If I run the query in the query tool, it's fine; I get
the link_body.

Can anyone tell me what's going on?

Thanks.
0
Comment
Question by:denam
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 200 total points
ID: 1855648
If you have only one text data field, then it should be the last mentioned in the select statement.

But always works when you define your recordset a bit differently:

Set RS = Server.CreateObject("ADODB.Recordset")
strLnk = "Select link_name, link_id, link_body, Link_url from links where link_id = " & linkID
RS.Open strSQL, Conn, 1, 1

0
 
LVL 28

Expert Comment

by:sybe
ID: 1855649
sorry the last line should be:
RS.Open strLnk, Conn, 1, 1
0
 
LVL 1

Author Comment

by:denam
ID: 1855650
Thanks Sybe.  Mind commenting on the difference between these two methods
of defining a record set?  
0
Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

 
LVL 28

Expert Comment

by:sybe
ID: 1855651
I just know that it makes a difference for mssql. I have no idea why. There is something like a quick & dirty recordset, and a recordset that is created according to ADO convenience.
0
 
LVL 1

Author Comment

by:denam
ID: 1855652
...actually this isn't working.  i get an object required error message.
0
 
LVL 28

Expert Comment

by:sybe
ID: 1855653
??
what is the error message, and what is the line that it points to ?
0
 
LVL 1

Author Comment

by:denam
ID: 1855654
HI Sybe, I'm not sure.  I ended up creating a separate
query for each of the text values I needed to return.  Kind of
a work around.  If I get some time, I can set up
a test and try to see what I was doing wrong.
0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Because your company can’t afford for you to make SEO mistakes, you’ll want to ensure you’re taking the right steps each and every time you post a new piece of content. This list of optimization do’s and don’ts can help you become an SEO wizard.
Dramatic changes are revolutionizing how we build and use technology. Every company is automating, digitizing, and modernizing operations. We need a better, more connected way to work together as teams so we can harness the insights from our system…
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question