473,387 Members | 1,535 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,387 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 9142
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.