• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

Displaying and editing long hyperlink data in mySQL/ASP

Am a complete newcomer to ASP/mySQL. I have one field in a mySQL table which stores long hyperlinks (Multimap page references). Have read the data in from an Access database where it was stored in a memo field. Have defined the mySQL field as a blob field. Is this the best field type to use? How can I set up an object on a form (presumably a textarea) in which I can read and edit the hyperlink. At present the data is not intelligible in the textarea, though I can read it in mySQL Front by highlighting the field and selecting the text tab, so the data is there.
Can I convert the data so it can be displayed in the textarea? If I cannot edit the data in that form, can I provide a button alongside the textarea which will display a dialog where the hyperlink can be changed/deleted and then fed back into the blob, or is this the wrong way to do it? If so, HOW can I do it?
Regards

0
bogorman
Asked:
bogorman
  • 4
  • 3
1 Solution
 
ClickCentricCommented:
BLOB is for binary data...try using a field of type TEXT instead.
0
 
bogormanAuthor Commented:
Hi,
Suppose the link is:

http://www.multimap.com/map/browse.cgi?client=public&search_result=&db=pc&cidr_client=none&lang=&pc=SW194NS&advanced=&client=public&addr2=&quicksearch=SW19+4NS&addr3=&addr1=

or longer. Is the maximum length of a TEXT field 256 characters?
Mind you, your comment has made me think. This link is I think just over half the 256 characters. Suppose it is unlikely that the Multimap links would be much longer.
Is there, however, any other solution to data longer than 256 characters?
Brian
0
 
ClickCentricCommented:
TEXT is a max of 65535 characters....TINYTEXT is a max of 255.  There's also MEDIUMTEXT and LONGTEXT, both are significantly bigger.

http://www.xnote.com/howto/mysql_field_types.html

The above url points to a sheet that gives a breakdown of field types/sizes.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
bogormanAuthor Commented:
Hi,
Thanks. If, as I am now beginning to realise, that the data in the field will almost certainly be less than 256 characters, should one use, say, a VARCHAR field (where trailing spaces are removed) to save space/speed up the database, or does this really not make much difference. Number of records on the table is about 30,000.
If speed an space are not really relevant would you still recommend a TEXT field?
Regards
Brian
0
 
joeposter649Commented:
<<Can I convert the data so it can be displayed in the textarea?>>
I would load the variables and their values into a dictionary object.
http://devguru.com/technologies/vbscript/13992.asp
Then put them in individual text fields on a form to be updated.
0
 
ClickCentricCommented:
Well, if I remember right, varchars are fixed-sized, so a varchar of width 255 will always be 255 characters, whereas a tinytext field will have variable size dependent on content.  It really depends on whether you'd ever want to index on the field or search on the field contents.  If so, varchar is better.  If not, tinytext is.  As for displaying the contents in a textarea, if it's just a url, there shouldn't be a problem as long as no special html characters are ever used (which shouldn't be possible in a valid url anyhow).
0
 
bogormanAuthor Commented:
Hi,
Thanks for your help. Will assign the points.
Regards
Brian
0
 
bogormanAuthor Commented:
Hi joeposter649,
Sorry, did not see your comment until I assigned all the points. Apologies.
Brian
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now