473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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 9130
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: QT | last post by:
Dear sirs, I try to put limit for text field to stop charecter entery after 2 charecter. But I have no success. Any idea how can I do? Best Regards
2
by: skg | last post by:
i am writing a UDF which takes nvarchar(max) as input parameter. Can any one tell me what is the equivalent of this data type in C#. Thx
11
by: panic attack | last post by:
Hello everbody, Our system is using Sql Server 2000 on Windows XP / Windows 2000 We have a text file needs to be imported into Sql Server 2000 as a table. But we are facing a problem which is,...
12
by: =?Utf-8?B?QW5kcmV3?= | last post by:
I am simple tryint to learn how to use the ADO.NET code. Can anybody tell me if I am using it right or not? Imports System.Data.sqlclient Imports System.Data Public Class Form1 Inherits...
1
by: tonnet | last post by:
Hi I have one function returning TABLE and I want to save the value returned by this function into a stored procedure to reuse later. Function: CREATE or replace FUNCTION list_to_tbl (@list...
8
by: Phil Endecott | last post by:
Dear Experts, I'm surprised to find that std::max doesn't work (i.e. won't compile) if the arguments are not of exactly the same type, e.g. one is a short and the other is a long: #include...
1
by: TGEAR | last post by:
I am going to generate 32-bit encryption key with combination of any number of characters. what data type and its size should I use for that on MS SQL 2005? will it be nvarchar(max) or...
1
by: DR | last post by:
When a clr has the input type of SqlString it causes nvarchar(4000) to be the parameter type of the function in sql server. how to modify my CLR function to use nvarchar(max) ?
2
by: mahendra dubey | last post by:
Hi There I m using sql server. I have a column Name nvarchar(max) in table.Now I want to change datatype nvarchar(max) to nvarchar(4000).Will the data be truncated automatically? if ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.