|
-
Nov 4th, 2002, 05:04 PM
#1
Thread Starter
Frenzied Member
Making a database, so one field can hold *unlimited length? *slvd*
hey ya,
How do i make my database table, so as one field, can hold about 500 - 1000 Chars?
currently i have a table, which i need to store URLs in, but a URL Like:
http://thewalks.ods.org:88/modules.p...stics&op=Stats
is being cut down to:
http://thewalks.ods.org:88/modules.php?name=Statis
how is it i can make it hold a larger length?
Possible or?
TNX
Last edited by wpearsall; Nov 4th, 2002 at 08:47 PM.
Wayne
-
Nov 4th, 2002, 06:09 PM
#2
Frenzied Member
If it'a an Access table, make the field of type 'Memo'
If it's SQL then just make it text (not Varchar) and it will create a pointer to another area which allows 65535 characters.
Mega.
"If at first you don't succeed, then skydiving is not for you"
-
Nov 4th, 2002, 07:24 PM
#3
Thread Starter
Frenzied Member
kool, tnx, know that was there
OK,,, Select * From _ Where This IS "this" and This IS NOT "this"
The MySQL Version:
"SELECT * FROM table WHERE this1='This' AND this2 !='This'"
How do i do that with access?...
The IS NOT part?
-
Nov 4th, 2002, 07:41 PM
#4
Frenzied Member
VB Code:
"SELECT * FROM table WHERE this1 = 'This' AND NOT(this2 ='This'")
Mega.
"If at first you don't succeed, then skydiving is not for you"
-
Nov 4th, 2002, 08:48 PM
#5
Thread Starter
Frenzied Member
: wow, VB is really, practical huh 
Tnx
-
Nov 6th, 2002, 07:23 AM
#6
The "not equal" operator (<>) will also work in Access as well as many other DBMS'.
"It's cold gin time again ..."
Check out my website here.
-
Nov 6th, 2002, 11:19 AM
#7
How do i make my database table, so as one field, can hold about 500 - 1000 Chars?
If it's SQL then just make it text (not Varchar) and it will create a pointer to another area which allows 65535 characters.
In SQL 7.0 and up a varchar can hold 8000 characters. More than enough for what wpearsall needs.
-
Nov 6th, 2002, 11:32 AM
#8
Frenzied Member
In SQL 7.0 and up a varchar can hold 8000 characters. More than enough for what wpearsall needs.
True.. but why would you want to do that?
IF you set a Varchar to be 8000 characters, you are telling SQL server to use an entire page for that field. A helluva waste of database space if your varchar field only has 100 characters in it.
Mega.
Last edited by Mega_Man; Nov 6th, 2002 at 11:41 AM.
"If at first you don't succeed, then skydiving is not for you"
-
Nov 6th, 2002, 11:36 AM
#9
Frenzied Member
Originally posted by Mega_Man
True.. but why would you want to do that?
IF you set a Varchar to be 8000 characters, you are telling SQL server to use an entire page for that field. A helluva waste of database space if your varchar field only has 100 characters in it.
Mega.
Yes, but it depends on how the field will be used, some functions won't work on fields with data type text. For one I know the Replace() function will not work. But I agree about saving space if most of the records will not be holding the same amount of data.
seoptimizer2001
VB 6.0, VC++, VI, ASP, JavaScript, HTML,
Perl, XML, SQL Server 2000
If God had intended us to drink beer, He would have given us stomachs.
Please use the [code] and [vbcode] tags in your posts!
If you don't know how to use them please go HERE!

-
Nov 6th, 2002, 01:01 PM
#10
IF you set a Varchar to be 8000 characters, you are telling SQL server to use an entire page for that field. A helluva waste of database space if your varchar field only has 100 characters in it.
A Varchar field is variable length. So a field that has only 100 characters and is defined as 8000 only takes up 103 bytes not 8003. (There is 3 bytes of overhead for every varchar column).
But you are right one must weigh the cost of whether to use a Varchar or Text column.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|