Problem with field type nvarchar(max)

M

maurox

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
 
B

Bob Barrows [MVP]

maurox said:
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
 
M

maurox

thank you!!!!

--
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 -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top