SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 4th, 2000, 09:33 PM
Steve Schofield Steve Schofield is offline
Contributing User
ASP Free God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 2002
Posts: 14,575 Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level)Steve Schofield User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 23
Retrieving data from a text datatype field through asp

<i><b>Originally posted by : Erik (erk@flashmail.com)</b></i><br /><br />I've employed the use of text fields for their large storage capacity to store large blocks of html code which i call dynamically to affect the look of a page quickly. I used the WRITETEXT sql statement to insert the block of html into the field... something like:<br /><br />set con =server.createobject("adodb.connection")<br /><br />sel="DECLARE @ptrval varbinary(16) SELECT @ptrval = TEXTPTR(livairhtml) FROM catalog READTEXT catalog.livairhtml @ptrval 0 5000"<br /><br /><br />con.open "users","sa","blahblahblah"<br />con.execute<br /><br />@ptrval is the local variable which equals the text pointer of the livairhtml field<br /><br />The problem i am having is in retrieving this data for display.<br /><br />I attempted using the reciprocal statement of the WRITETEXT statement which is the READTEXT statement but was unable to figure out how to return the results of the query so they could be displayed on the page.. Any help would be much appreciated.<br /><br />Thanks,<br />Erik Taylor<br />web goo (not a gooroo yet)

Reply With Quote
  #2  
Old November 19th, 2003, 09:57 AM
m_lazor m_lazor is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Luxembourg
Posts: 156 m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level)m_lazor User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
IN SQL Online Books I found

READTEXT catalog.livairhtml @ptrval 1 5000

Notice the "1" instead of "0".

Next problem, if I got that right, is that your text contains tags. Without precaution your string will be interpreted by the browser and not display at all or with an error

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Retrieving data from a text datatype field through asp


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT