| Author |
Topic |
|
nacho45
Starting Member
3 Posts |
Posted - 2006-02-01 : 17:56:12
|
| Hey guys,I'm putting together a script that pulls a database for definitions...It's very straight forward. Pull the word and definition, which are each stored as fields in the definitions table.I would like the definitions to be able to have URLs in them. But when I just add the URL code to the text, it truncates the text where the URL is. Is there an easy way to pull text from SQL and have URLs to the text?Thanks,Nacho |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-02-01 : 20:24:19
|
| Nacho, Can u describe more or give the relevent part of ur program.What URL u r talking about? What word, what definitions? - Is it Specific to ur table / data or u r talking about generic data? |
 |
|
|
MichaelP
Jedi Yak
2489 Posts |
Posted - 2006-02-01 : 20:39:42
|
| Is it also possible that you are only getting the first 254 bytes of the column in query analyzer instead of all 8000 or so of your VARCHAR field? Are you using QA?If so, look under Tools-->Options-->Results (tab)The Max Chars per colum should be set at 8000.Michael<Yoda>Use the Search page you must. Find the answer you will. Cursors, path to the Dark Side they are. Avoid them, you must. Use Order By NewID() to get a random record you will.</Yoda> |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
nacho45
Starting Member
3 Posts |
Posted - 2006-02-01 : 20:54:27
|
quote: Originally posted by Srinika Nacho, Can u describe more or give the relevent part of ur program.What URL u r talking about? What word, what definitions? - Is it Specific to ur table / data or u r talking about generic data?
So, I'll explain a bit further and give an example...My database is very simple. One table 'Encyclopedia', and two fields, 'term' and 'definition'. Imagine an online dictionary almost.So, let's say for example...if the term is 'guitar', the following will happen...'term': 'definition' (pseudo code for what i'm querying to print to the site)[Example 1: This works fine with no URL...prints as expected]guitar: a 6 stringed instrument. read more at MusicHelp.[Example 2: as soon as I add a URL it doesn't work...so I'd be trying to print]guitar: a 6 stringed instrument. read more at <a href="http://www.musichelp.com">MusicHelp</a>.[but instead, my output gets truncated and only prints the following:]guitar: a 6 stringed instrument. read more at It always happens exactly at the URL, so I know it isn't the size of the field. Any ideas? I just want to have a huge block of text with a URL in it print out on the page... |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-02-01 : 21:01:29
|
| Where is the URL stored?Tara Kizeraka tduggan |
 |
|
|
nacho45
Starting Member
3 Posts |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2006-02-01 : 21:38:45
|
quote: Originally posted by Srinika Nacho, Can u describe more or give the relevent part of ur program.What URL u r talking about? What word, what definitions? - Is it Specific to ur table / data or u r talking about generic data?
This isn't AOL. Try to use complete words.Damian"A foolish consistency is the hobgoblin of little minds." - Emerson |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-02-02 : 06:32:01
|
quote: Originally posted by MerkinThis isn't AOL. Try to use complete words.... A foolish consistency .....
Oh I thought this is AOL, Sorry Merkin. I'll "Try" what u "Ordered" me. Thank u (sorry - you) so muchAlso y do u write "isn't" rather than "is not""AOL" rather than "American On Line" oh come on BTW I was answering nacho and, u don't need to be bothered about my way of typing. If u are bothered please ignore it, its hard for me to avoid my habit. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-02-02 : 12:10:02
|
quote: Originally posted by nacho45
quote: Originally posted by tkizer Where is the URL stored?Tara Kizeraka tduggan
The URL is: http://www.mortgageclover.com/encyclopedia.php?id=20which gets cut off right at the place of the intended hyperlink after the word "Many"Compare with: http://www.mortgageclover.com/encyclopedia.php?id=1 or any of the other definitions in the index...
If the URL isn't stored in the database, then this sounds like a presentation issue and not a SQL Server issue. Have you tried posting your application code in a forum that deals with that specific programming language?Tara Kizeraka tduggan |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2006-02-02 : 12:13:17
|
quote: Also y do u write "isn't" rather than "is not""AOL" rather than "American On Line"
isn't is a contraction of is not. AOL is an abbreviation. ur is not an abbreviation for your. u is not an abbreviation for you. Merkin is just trying to get the people who answer questions to sound professional in their replies as this is a professional web site.Tara Kizeraka tduggan |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-03 : 03:28:45
|
Srinika, when you reply in Forums dont use short words as you use when chatting MadhivananFailing to plan is Planning to fail |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-02-03 : 06:39:41
|
Madhi, I respect your suggestion, as I learned a lot from your (and lot of others in this forum) answers. I'm not a chat lover (in an earlier day also you told me that ). I am a slow typist and my English is not that good. So what I do now is when I want to ask a question, I ask without short words. When I'm answering somebody else's question, I use short forms, as some are quite obvious.From the question raiser's point of view, he doesn't mind about abbreviations. He is looking for the answer, where he is willing to use some of his CPU cycles to convert the short words, that I use.Dont we (not only me) use lot of short words ?SQL & URL are two of these in this same question.Generally used others includeCPU, HTMP, ASP, .....don't, can't, ....Also, we use "smilies" here (even if it was started in chat)If you analyze my answers more than 80% of abbreviations I used are:"u" & "r". I rarely use b, 2, 4 & 8 etc. as used by chat guys.b4, gr8 ...not used everSo bare with me, as I'm not doing something terrible |
 |
|
|
|