数据库字段长度问题 [英] Database field length problem
问题描述
大家好
我有一个访问数据库作为网站的来源运行但是它已经变得太大而无法正常运行所以它已被移植到MS- SQL
问题是4个字段是访问中的备注字段,而
这样的字符长度超过5000个字符,每个字符溢出允许的大小
SQL服务器(8192)
有没有一种方法可以将这4个字段拆分成单独的
故事?因为这将导致真正重大的网站重写
感谢您的帮助
如果需要,可提供更多详细信息
Hi everyone
I had an access database running as the source for a website but it
has become too large to run correctly so it has been ported to MS-SQL
the problem is that 4 of the fields were Memo fields in access and as
such are 5000+ characters long each this overflows the allowed size on
the SQL server (8192)
Is there a way round without splitting those 4 fields into seperate
tales?? as this would cause a truly major re-write of the website
Thanks for any help
Further details available if required
推荐答案
如果你使用VarChar,你能不能将最大字段长度设置为8000个字符?
我不能相信SQL有这样的限制,肯定有一种方法可以自动地使用两个行来记录一个记录,或者这需要额外编程吗?
ASP?
干杯,Ash
" Peter" < PE *** @ iib.ws>在消息中写道
news:81 ************************ @ posting.google.com ...
If you use VarChar can you not set the max field length to 8000 characters?
I can''t believe SQL has such limits, surely there''s a way to automatically
use two rows for one record, or does this require additional programming in
ASP?
Cheers, Ash
"Peter" <pe***@iib.ws> wrote in message
news:81************************@posting.google.com ...
大家好
我有一个访问数据库作为网站的来源运行,但它已经变得太大而无法正常运行所以它已被移植到MS-SQL
问题是4个字段是访问中的备注字段,并且
这样的长度超过5000个字符,这会溢出SQL服务器上允许的大小(8192)
有没有将这4个领域分成单独的故事?因为这将导致真正重大的网站重写
感谢您的帮助
如果需要可提供更多详细信息
Hi everyone
I had an access database running as the source for a website but it
has become too large to run correctly so it has been ported to MS-SQL
the problem is that 4 of the fields were Memo fields in access and as
such are 5000+ characters long each this overflows the allowed size on
the SQL server (8192)
Is there a way round without splitting those 4 fields into seperate
tales?? as this would cause a truly major re-write of the website
Thanks for any help
Further details available if required
你好
当我尝试导入一个平面文本文件,其中我使用了变换
工具来声明四个字段的字段大小为6000我得到了
以下错误如果它们是varchar
不能创建一个大小为8366的行,这个行大于允许的
最大值为8060
如果我将它们映射为ntext我没有收到错误但数据被截断
任何想法
Peter
***通过Devdex发送 http:// www .devdex.com ***
不要只是参加USENET ......获得奖励!
Hi there
When i try to import a flat text file where i have used the transform
tool to delare field sizes of 6000 for the four fields i get the
following error if they are varchar
cannot create a row of size 8366 which is greater than the allowable
maximum of 8060
If i map them as ntext i dont get an error but the data is truncated
Any ideas
Peter
*** Sent via Devdex http://www.devdex.com ***
Don''t just participate in USENET...get rewarded for it!
Peter Winning(pe***@iib.ws)写道:
Peter Winning (pe***@iib.ws) writes:
当我尝试导入一个平面文本文件,我有你sed变换
工具为四个字段delare字段大小6000我得到
如果它们是varchar
不能创建一个大于8366的行大于允许的最大值8060
如果我将它们映射为ntext我没有收到错误但数据被截断
When i try to import a flat text file where i have used the transform
tool to delare field sizes of 6000 for the four fields i get the
following error if they are varchar
cannot create a row of size 8366 which is greater than the allowable
maximum of 8060
If i map them as ntext i dont get an error but the data is truncated
ntext可能是要走的路,因为这是在一行上获得超过8060字节数据的唯一方法。
为什么你的ntext数据是截断我不知道,但是我再也不知道如何导入数据了。 CREATE TABLE定义和示例数据
文件可以提供帮助。 (你必须将数据文件打包成一个zip
文件,因为如果你将b / b
发布为文本,肯定会被新闻传输破坏。) />
-
Erland Sommarskog,SQL Server MVP, es****@sommarskog.se
SQL Server SP3联机丛书
http://www.microsoft.com/sql/techinf...2000/books.asp
这篇关于数据库字段长度问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!