Solved

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

Posted on 2008-10-09
3
2,108 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks! Exactly what I needed.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

744 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now