473,397 Members | 1,972 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,397 software developers and data experts.

getting ntext datatype

I am returning a datatable from a stored procedure and then iterating
through the columns. I am trying to find out if a column has the sql
data type of ntext. In .net the datatype of a sql ntext column is
System.String. .Net also returns System.String for varchar, char, text,
nvarchar and nchar. This obviously does not help me as I want to
identify the ntext column

I have searched for this and cannot find the answer in .net. I can
however query the database for the column datatype but this seems like
overkill.

Can any help?

Thanks

Nov 19 '05 #1
1 1968
DataTable is a generic thing. You can get a DataTable from an access
database, which knows nothing of VarChar's and Text SQL types.

The only way I'm aware of is to use the GetSchemaTable from the
SqlDataReader:
http://www.netomatix.com/DumpDbSchema.aspx

Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/
"Rippo" <in**@rippo.co.uk> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am returning a datatable from a stored procedure and then iterating
through the columns. I am trying to find out if a column has the sql
data type of ntext. In .net the datatype of a sql ntext column is
System.String. .Net also returns System.String for varchar, char, text,
nvarchar and nchar. This obviously does not help me as I want to
identify the ntext column

I have searched for this and cannot find the answer in .net. I can
however query the database for the column datatype but this seems like
overkill.

Can any help?

Thanks

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: tony | last post by:
I changed the datatype of a field in a SQL Server 2000 database from nvarchar to ntext, but now nothing is being displayed. The "Body" column of the datatable used to be nvarchar(8000) and the...
2
by: KathyB | last post by:
Hi, I've read conflicting articles on updating an ntext field in a column. My ntext field will exceed 8,000 characters (typically twice that size -- but just a text string). One article (I...
5
by: Cally | last post by:
Hello, I would like to convert a field from ntext field found in one database table to float field found in another database table. The reason why I want to do this is a long one. I have...
3
by: Matik | last post by:
Hello to all, Below the sample code: declare @arg_szMsgText ntext set @arg_szMsgText = isnull(@arg_szMsgText, N'unknown message') Now the error message I get: "The assignment operator...
2
by: igorsl | last post by:
Hi, I have a problem to insert(update) a long text (more than 64K) into SQL 2000 (datatype - 'text'). It cuts the data and insert only 64K. MSDN says: "When the ntext, text, and image data values...
6
by: rey | last post by:
Hello, I need to produce with T-SQL a user defined function or stored procedure that make one SLQ-Statement and prepare as string from the result set. The request muss be able to return a very...
2
by: Sileesh | last post by:
HI I know this is not the right forum to post this question, but i think some one might have a suggestion. I have a Table "Test" with columns Id bigint (PK), Number Varchar(50), Notes ntext....
3
by: =?Utf-8?B?ZGF2aWQ=?= | last post by:
I try to follow Steve's paper to build a database, and store a small text file into SQL Server database and retrieve it later. Only difference between my table and Steve's table is that I use NTEXT...
2
by: verb13 | last post by:
I am running this query to an sql server 2000 database from my asp code: "select * from MyTable where MySqlServerRemoveStressFunction(MyNtextColumn) = '" & MyAdoRemoveStressFunction(MyString) &...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.