John,
In one case there are many more fields. Nevertheless, I also generated
a test case where the only field in the table is a varchar(8000). I
have run this test case on a machine with SQL Server 2005 Express and
it did work just fine. On another two systems with SQL Server 2000 it
failed. This seems to indicate that there is some issue with SQL
Server, though even 2000 should support 8000 chars. If you want email
me and I can send you the sample code.
Thanks
[quoted text, click to view] John Bell wrote:
> Hi
>
> Out of interest what other columns are there in this table and how large are
> they?
> The Bytes per row is 8,060 for SQL 7/2000.
>
> John
>
> "hufaunder@yahoo.com" wrote:
>
> > I have a table with a field of type varchar(8000). Unfortunately, I am
> > not able to store more then approx 3900 characters. This is the error I
> > get:
> >
> > Disallowed implicit conversion from data type ntext to data type
> > varchar, table xxx column yyy Use the CONVERT function to run this
> > query.
> >
> > I have a feeling it might have something to do with Unicode/Multibyte
> > characters. Nevertheless, when I look at the values in SQL Server
> > Enterprise Manager and also copy them to WinWord I do not see that it
> > uses 16-bits/char (maybe it automatically handles this for display
> > purposes). In any case, how can I store 8000 characters in the field?
> >
> > I am using Visual Studio 2005, C# and SQL Server 2000.
> >
> > Thanks
> >
> >
Hi
It seems that Steve's assessment of an unconvertable character at about the
length you get is the most probably reason. Use the UNICODE function to find
the integer value for these characters. It could be that word is stripping
these out
The maximum nvarchar size is 4000 so I would not expect greater than that,
but you may want to try converting to nvarchar to see if it is greater than
the 3900 using the datalength function.
John
[quoted text, click to view] "hufaunder@yahoo.com" wrote:
> John,
>
> In one case there are many more fields. Nevertheless, I also generated
> a test case where the only field in the table is a varchar(8000). I
> have run this test case on a machine with SQL Server 2005 Express and
> it did work just fine. On another two systems with SQL Server 2000 it
> failed. This seems to indicate that there is some issue with SQL
> Server, though even 2000 should support 8000 chars. If you want email
> me and I can send you the sample code.
>
> Thanks
> John Bell wrote:
> > Hi
> >
> > Out of interest what other columns are there in this table and how large are
> > they?
> > The Bytes per row is 8,060 for SQL 7/2000.
> >
> > John
> >
> > "hufaunder@yahoo.com" wrote:
> >
> > > I have a table with a field of type varchar(8000). Unfortunately, I am
> > > not able to store more then approx 3900 characters. This is the error I
> > > get:
> > >
> > > Disallowed implicit conversion from data type ntext to data type
> > > varchar, table xxx column yyy Use the CONVERT function to run this
> > > query.
> > >
> > > I have a feeling it might have something to do with Unicode/Multibyte
> > > characters. Nevertheless, when I look at the values in SQL Server
> > > Enterprise Manager and also copy them to WinWord I do not see that it
> > > uses 16-bits/char (maybe it automatically handles this for display
> > > purposes). In any case, how can I store 8000 characters in the field?
> > >
> > > I am using Visual Studio 2005, C# and SQL Server 2000.
> > >
> > > Thanks
> > >
> > >
>
Don't see what you're looking for? Try a search.