I have MSDE installed on my computer and I'm usingWeb Data Administrator to manage my databses. The problem is that whenever I add a column with a length of more than 8000, I get the following error:
Length must be between 0 and 8000
If I create the column programmatically then i get this error:
The following error occured while executing the query:
Server: Msg 131, Level 15, State 2, Line 2
The size (8005) given to the column 'Article' exceeds the maximum allowed for any data type (8000).
I need several columns that can hold around32,000 characters. What's the deal? Is this a limit with MSDE, or am Imissing something?
Thanks
::Is this a limit with MSDE, or am I missing something?
Yoou miss reading the documentation.
ROWS in SQL Server - not just MSDE - are limited to 8000 bytes. This means the whole row, not a single field.
For longer data there are special datatypes (like text or ntext) that do not store the data in the row, but use separate tables. They are limited (no indexing and some other limitations).They work wonderfully with up to 2gb per field.
This is properly documented in the documentation for SQL Server, which I suggest you ahve a look at. It is also available online at Microsoft.
The documentation to which thona is referring (but for which he never provides a link) is calledSQL Server 2000 Books Online. It is a free reference from Microsoft and is one which I personally refer to many times a day. It is a large download but well worth the time.
The same content is available at the MSDN site:Getting Started with SQL Server Books Online.
|||What Sql Server datatype would give me the equivalent of the "Memo" type in Access?
Thanks
|||That would be text (or ntext if you need to support international characters).
|||I'm sorry, but I should have asked this in my previous post...
What length should I specify?
Like... text(16), or text(32)?
Am I correct in assuming that (16) would give me 32768 characters?
Thanx
|||
stevesimon wrote:
I'm sorry, but I should have asked this in my previous post...
What length should I specify?
Like... text(16), or text(32)?
Am I correct in assuming that (16) would give me 32768 characters?
Thanx
I wouldn't specify a length at all -- it is not needed for the text data type.
As suggested, Books Online and MSDN are excellent references and youcould easily find this information yourself. According tontext, text, and image the text data type can store 2,147,483,647 characters.
|||
Just a qwuestion -why are you so reluctant to even LOOK into the online documentation ONCE?
Btw, tehe equivalent of Access "Memo" is NOT text - it is ntext. Access has no notion of non-unicode strings.
|||I did look at the documentation, but could not find the answer to my specific question.|||Try using OLE(Object Linking and Embedding) in Access to store them asWord and import them into MSDE as image files and most of your problemswill go away. Hope this helps.
Kind regards,
Gift Peddie