472,098 Members | 2,382 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,098 software developers and data experts.

Problem with field type nvarchar(max)

Hi,
i have a simple table with a field called "authors". this filed have a
nvarchar(max) type (in MSSql 2005).

i have a simple query "Select authors FROM table". in query analizer
this return the value of authors, but when i run this in asp page, the
field is empty.

in the code i have:

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, Conn, 1, 1

but rs("Authors") is empty.

If i change the type (and i use nvarchar(4000) for authors) there is no
problem.

for the connection i have Driver={SQL Native Client}.

thanks

Jan 17 '07 #1
3 9002
i use Win XP SP2, MDAC 2.8 SP1, IIS5.1

On 17 Gen, 14:49, "maurox" <maurizio.r...@gmail.comwrote:
Hi,
i have a simple table with a field called "authors". this filed have a
nvarchar(max) type (in MSSql 2005).

i have a simple query "Select authors FROM table". in query analizer
this return the value of authors, but when i run this in asp page, the
field is empty.

in the code i have:

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, Conn, 1, 1

but rs("Authors") is empty.

If i change the type (and i use nvarchar(4000) for authors) there is no
problem.

for the connection i have Driver={SQL Native Client}.

thanks
Jan 17 '07 #2
maurox wrote:
Hi,
i have a simple table with a field called "authors". this filed have a
nvarchar(max) type (in MSSql 2005).

i have a simple query "Select authors FROM table". in query analizer
this return the value of authors, but when i run this in asp page, the
field is empty.

in the code i have:

Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, Conn, 1, 1

but rs("Authors") is empty.

If i change the type (and i use nvarchar(4000) for authors) there is
no problem.

for the connection i have Driver={SQL Native Client}.

thanks
See if this helps:
http://msdn2.microsoft.com/en-us/library/ms130978.aspx

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jan 17 '07 #3

thank you!!!!

On 17 Gen, 16:39, "Bob Barrows [MVP]" <reb01...@NOyahoo.SPAMcomwrote:
maurox wrote:
Hi,
i have a simple table with a field called "authors". this filed have a
nvarchar(max) type (in MSSql 2005).
i have a simple query "Select authors FROM table". in query analizer
this return the value of authors, but when i run this in asp page, the
field is empty.
in the code i have:
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, Conn, 1, 1
but rs("Authors") is empty.
If i change the type (and i use nvarchar(4000) for authors) there is
no problem.
for the connection i have Driver={SQL Native Client}.
thanksSee if this helps:http://msdn2.microsoft.com/en-us/library/ms130978.aspx

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.- Nascondi testo tra virgolette -- Mostra testo tra virgolette -
Jan 17 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

12 posts views Thread by =?Utf-8?B?QW5kcmV3?= | last post: by
8 posts views Thread by Phil Endecott | last post: by
1 post views Thread by TGEAR | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.