Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Data Type: text?

LEGEND ,
May 08, 2007 May 08, 2007
text 16

I have a text table with a size of 16.

I need to be able to store more text. Can I change the size of the this
text field? Should I change the character type?

Thanks
TOPICS
Server side applications
766
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007
What's a text table?

Anyway, if you're using MS SQL Server, you probably do not want any columns
to use the "text" data type.
Use VARCHAR if you can live with an upper limit of 8000 characters.
If not, and if you have SQL Server 2005, use VARCHAR(MAX)
Otherwise, you're stuck using the text data type. 16 is the size, not the
number of characters. It just stores a 16-byte pointer to the storage
needed to hold your 2GB (potentially) text.


"Lee" <lee_nospam_@artjunky.com> wrote in message
news:f1qgps$buc$1@forums.macromedia.com...
> text 16
> I have a text table with a size of 16.
>
> I need to be able to store more text. Can I change the size of the this
> text field? Should I change the character type?
>
> Thanks


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007
yes, the data type was "text" and the length 16

I knew it wasn't the number of characters but it's not allowing me to
post all my text. This is the text I am trying to post but it rejects it.

--------------------
<p>Glassware Kit Don&rsquo;t want to waste time searching for all the
essential glassware pieces you need? A convenient selection of
borosilicate laboratory glassware. Included are the following: </p>
<table width="100%" border="0">
<tr>
<td width="49%" valign="top"><ul>
<li>1 &ndash; Griffin beaker 50ml</li>
<li> 2 &ndash; Griffin beaker 250ml </li>
<li>1 &ndash; Griffin beaker 600ml </li>
<li>1 &ndash; Erlenmeyer flask 50ml </li>
<li>2 &ndash; Erlenmeyer flask 250ml </li>
<li> 1 &ndash; Erlenmeyer flask 500ml </li>
<li>6 &ndash; medicine droppers </li>
</ul></td>
<td width="51%" valign="top"><ul>
<li>6 &ndash; stir rods 6&rdquo;</li>
<li>1 &ndash; cylinder 10ml, </li>
<li>1 &ndash; cylinder 100ml, </li>
<li> 1 &ndash; serological pipette, </li>
<li> 12 &ndash; test tubes 16x150mm </li>
<li> 1 &ndash; short stem funnel </li>
</ul></td>
</tr>
</table>
----------------------

Lionstone wrote:
> What's a text table?
>
> Anyway, if you're using MS SQL Server, you probably do not want any columns
> to use the "text" data type.
> Use VARCHAR if you can live with an upper limit of 8000 characters.
> If not, and if you have SQL Server 2005, use VARCHAR(MAX)
> Otherwise, you're stuck using the text data type. 16 is the size, not the
> number of characters. It just stores a 16-byte pointer to the storage
> needed to hold your 2GB (potentially) text.
>
>
> "Lee" <lee_nospam_@artjunky.com> wrote in message
> news:f1qgps$buc$1@forums.macromedia.com...
>> text 16
>> I have a text table with a size of 16.
>>
>> I need to be able to store more text. Can I change the size of the this
>> text field? Should I change the character type?
>>
>> Thanks
>
>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007
What error are you receiving when your application "rejects" it? Text
datatypes in SQL Server often need some special handling that varchars don't
otherwise require.

Best regards,
Chris

"Lee" <lee_nospam_@artjunky.com> wrote in message
news:f1qhl1$d0g$1@forums.macromedia.com...
> yes, the data type was "text" and the length 16
>
> I knew it wasn't the number of characters but it's not allowing me to post
> all my text. This is the text I am trying to post but it rejects it.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007
Chris In Madison wrote:
> What error are you receiving when your application "rejects" it? Text
> datatypes in SQL Server often need some special handling that varchars don't
> otherwise require.


I'm entering right into the database using enterprise manager so I don't
see any errors.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007
On a side note, I'm trying to figure out if varchar with a max of 8000
would work. Is there a common tool out there that counts characters?

I tried word but have not found anything that counts characters. Any ideas?

Also, do you think id run into problems converting from "text" to varchar?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007
Any more ideas on any of this?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007

"Lee" <lee_nospam_@artjunky.com> wrote in message
news:f1qj0t$eoe$1@forums.macromedia.com...
> On a side note, I'm trying to figure out if varchar with a max of 8000
> would work. Is there a common tool out there that counts characters?

> I tried word but have not found anything that counts characters. Any
> ideas?

MS Word. Tools->Word Count
It actually counts words, sentences, and characters, not just words. The
name is misleading.

> Also, do you think id run into problems converting from "text" to varchar?

Not if everything is less than 8000 characters and if the text doesn't cause
the total size of data in your row to exceed about 8060 bytes.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 08, 2007 May 08, 2007
Why don't you just convert it and see what happens?


"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:f1qpbl$mda$1@forums.macromedia.com...
>
> "Lee" <lee_nospam_@artjunky.com> wrote in message
> news:f1qj0t$eoe$1@forums.macromedia.com...
>> On a side note, I'm trying to figure out if varchar with a max of 8000
>> would work. Is there a common tool out there that counts characters?
>
>> I tried word but have not found anything that counts characters. Any
>> ideas?
>
> MS Word. Tools->Word Count
> It actually counts words, sentences, and characters, not just words. The
> name is misleading.
>
>> Also, do you think id run into problems converting from "text" to
>> varchar?
>
> Not if everything is less than 8000 characters and if the text doesn't
> cause the total size of data in your row to exceed about 8060 bytes.
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
If memory serves, you won't be able to see the text in EM once you enter it
if the datatype is "text". I believe that there's a placeholder that's put
in the field in EM when viewing the record (says "text" or something like
that?). The content is there, but you won't likely be able to read it with
EM's tools. It's been a while since I've used this type, though. Because
of its uniqueness, and the potential hoops you have to jump through to use
it, I tend to stay away from it and use varchar where I can.

Best regards,
Chris

"Lee" <lee_nospam_@artjunky.com> wrote in message
news:f1qii2$e75$1@forums.macromedia.com...
>
> I'm entering right into the database using enterprise manager so I don't
> see any errors.


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
On a side note, if you have to enter Unicode characters, and you select
nvarchar as the datatype, you'll be limited to ~4000 characters. So unless
you have a need, I'd stick with varchar.

Best regards,
Chris

"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in message
news:f1qpbl$mda$1@forums.macromedia.com...
>
>> Also, do you think id run into problems converting from "text" to
>> varchar?
>
> Not if everything is less than 8000 characters and if the text doesn't
> cause the total size of data in your row to exceed about 8060 bytes.
>


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
I was thinking about that over last night. I was just wondering, with
the way Dreamweaver now handles recordsets as "commands" and assigns a
code for the data type, would there be difference between "text" and
"varchar"?

JimBo wrote:
> Why don't you just convert it and see what happens?
>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
Yes, generally I do to but I inherited this and up until now, it wasn't
a problem.
Chris In Madison wrote:
> If memory serves, you won't be able to see the text in EM once you enter it
> if the datatype is "text". I believe that there's a placeholder that's put
> in the field in EM when viewing the record (says "text" or something like
> that?). The content is there, but you won't likely be able to read it with
> EM's tools. It's been a while since I've used this type, though. Because
> of its uniqueness, and the potential hoops you have to jump through to use
> it, I tend to stay away from it and use varchar where I can.
>
> Best regards,
> Chris
>
> "Lee" <lee_nospam_@artjunky.com> wrote in message
> news:f1qii2$e75$1@forums.macromedia.com...
>> I'm entering right into the database using enterprise manager so I don't
>> see any errors.
>
>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
I just changed it and it worked. Thanks for the help.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
Update,

I changed the table to varchar with a length of 4000; it worked for one
but I copied a larger set in and it failed. Could the "%" be throwing it?

If so, should I do this differently? What would you recommend?

Below is what failed with
------------
<p>Labware Kit Basic yet professional. Contains all the basic
professional borosilicate labware and equipment for conducting science
experiments. The kit contains the text, &ldquo;700 Science Experiments
for Everyone&rdquo; (250 pages) as a source of safe experiments. Other
components include: </p>
<table width="100%" border="0">
<tr>
<td width="49%" valign="top"><ul>
<li>1 &ndash; rubberized lab apron </li>
<li>1 &ndash; Bomex brand beaker, 100ml </li>
<li>1 &ndash; Bomex brand beaker, 250ml</li>
<li>1 &ndash; Bomex brand beaker, 400ml</li>
<li>1 &ndash; porcelain evaporating dish </li>
<li>1 &ndash; Erlenmeyer flask, 250 ml, Bomex brand </li>
<li> 1 &ndash; Thistle tube, plastic</li>
<li>1 &ndash; safety goggles</li>
<li>1 &ndash; graduated cylinder, 50ml, Bomex brand </li>
<li>1 &ndash; filtering paper</li>
<li> 12 &ndash; medicine droppers</li>
<li> 1 &ndash; spatula, stainless steel, 22cm length </li>
<li> 1 &ndash; sponge 1x3-3/8&rdquo;</li>
</ul></td>
<td width="51%" valign="top"><ul><li> 3 &ndash; rubber stoppers,
#6, solid</li>
<li> 6 &ndash; test tubes 16x150mm </li>
<li> 1 &ndash; test tube rack </li>
<li>1 &ndash; test tube brush </li>
<li> 1 &ndash; test tube clamp, brass</li>
<li> 1 &ndash; pair of crucible tongs </li>
<li> 1 &ndash; pipestem triangle </li>
<li>1 &ndash; burner tripod, cast iron </li>
<li> 1 &ndash; wire gauze square, 4x4&rdquo;</li>
<li> 1 &ndash; crucible, porcelain HF</li>
<li> 1 &ndash; plastic cylinder 100 ml capacity</li>
</ul></td>
</tr>
</table>
-------------------------
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
I don't think it was the "%" What else could it be?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 09, 2007 May 09, 2007
LATEST
It's probably not a problem, that "%" symbol.

Can you define "fail" for us? Does it not render on the web page properly?
Or are you still working in EM?

Best regards,
Chris

"Lee" <lee_nospam_@artjunky.com> wrote in message
news:f1sqlg$9er$1@forums.macromedia.com...
> Update,
>
> I changed the table to varchar with a length of 4000; it worked for one
> but I copied a larger set in and it failed. Could the "%" be throwing it?
>
> If so, should I do this differently? What would you recommend?


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines