Solved

- conversion from 'int' to 'text' is not supported on the connected database server

Posted on 2008-10-09
3
2,158 Views
Last Modified: 2012-06-21
I have a numeric field that the client wants to be text now. I right-click, choose modify, and change it from type int to text (I also tried ntext). I am doing this in SQL Server Management Express. The database uses Windows Authentication. I get the error message:

conversion from 'int' to 'text' is not supported on the connected database server

What do I need to do? Thanks!
0
Comment
Question by:gaynes
3 Comments
 
LVL 24

Accepted Solution

by:
DBAduck - Ben Miller earned 500 total points
ID: 22682012
I would change the type to varchar(max) instead of text.  It is much more text like and you would alleviate having things that you had to deal with on the update and changing of the text field.

If this is NOT SQL 2005 then I would change it to a varchar(30) and save it and then change it to text.
0
 
LVL 5

Expert Comment

by:Cvijo123
ID: 22682081
imo never use ntext or text if u really dont need and for your example changeing int to varchar(30) should be more than enough.

text and ntext fields are not stored on pages with rest of row data, they are stored on separete part of page and every query that select those columns is slow and u are limited on doing some thing if u have text/ntext field.

so use varchar :)

0
 

Author Closing Comment

by:gaynes
ID: 31504813
Thanks! Exactly what I needed.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
I have a large data set and a SSIS package. How can I load this file in multi threading?
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question