# storing long text in sql server

**URL:** <https://forum.servoy.com/t/storing-long-text-in-sql-server/2242>\
**Category:** Classic Servoy\
**Created:** [July 13, 2004, 3:27pm UTC](https://forum.servoy.com/t/storing-long-text-in-sql-server/2242 "2004-07-13T15:27:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [July 13, 2004, 3:27pm UTC](https://forum.servoy.com/t/storing-long-text-in-sql-server/2242/1 "2004-07-13T15:27:27Z")

</div>

Hello, I am having a problem with storing long texts in MS SQL Server.

The maximum field length for varchar is 8000 (as far as I know). How do I store longer texts as such (not as a binary)? I have tried to use a media field (type “image” in Sql Server), but there I can’t insert text from inside Servoy.

Any ideas anyone?

Thanks, Patrick

---

<div class="post-metadata">

**Author:** ![bcusick](https://avatars.discourse-cdn.com/v4/letter/b/ed8c4c/32.png) [@bcusick](https://forum.servoy.com/u/bcusick)\
**Post date:** [July 13, 2004, 7:21pm UTC](https://forum.servoy.com/t/storing-long-text-in-sql-server/2242/2 "2004-07-13T19:21:24Z")

</div>

Use the “TEXT” datatype. You have to define this on the backend using Enterprise Manager.

Hope this helps,

Bob Cusick

---

<div class="post-metadata">

**Author:** ![patrick](https://avatars.discourse-cdn.com/v4/letter/p/b2d939/32.png) [@patrick](https://forum.servoy.com/u/patrick)\
**Post date:** [July 15, 2004, 5:18pm UTC](https://forum.servoy.com/t/storing-long-text-in-sql-server/2242/3 "2004-07-15T17:18:05Z")

</div>

That does it. Thanks for that.

How compatible is that sort of datatype? What do I do when I move on to e.g. Sybase? The datatype issue is a bit of a miracle, since every vendor seems to “invent” their own (like “XML” or the like). But that issue with large amount of text is a rather common one, I think…
