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

Cannot use TEXTIMAGE_ON when a table...

I am wondering if someone can help solve this question I have a table
in sql server 2000, I setup it using Enterprise manager.

When I generate an SQL Script for this table it scripts as:
CREATE TABLE [dbo].[CubicleConfiguration] (
[CubicleConfigurationID] [int] IDENTITY (1, 1) NOT NULL ,
[Description] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

Which is fine, however when I try to insert that into another database
using query anaylser I get the following error:

Server: Msg 1709, Level 16, State 1, Line 2
Cannot use TEXTIMAGE_ON when a table has no text, ntext, or image
columns.
OK I know I can remove the TEXTIMAGE_ON [PRIMARY] and that solves the
problem, however I have written some scripts to automate script
generation process, and this TEXTIMAGE thing, throws a spanner in the
automation process.

Any to suggestions as to why this is happening?

If I try building a new table manually using enterprise manager
creating the same table definition above, then script it, I get:
CREATE TABLE [dbo].[CubicleConfiguration2] (
[CubicleConfigurationID2] [int] IDENTITY (1, 1) NOT NULL ,
[Description2] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL
) ON [PRIMARY]
GO

Which is correct and should be generated in the first place

Any ideas as to why enterprise manager decides to add a TEXTIMAGE_ON
[PRIMARY] and break it?

The question is has something in the schema been corrupt?, how do I
return it back to normal?

Jul 23 '05 #1
6 14516
Hi

It seems that at some point the table may have contained a text or image
column and there is an entry left in sysindexes with an indid of 255 for
that table.

Without modifying sysindexes directly you may have to resort to re-creating
that table under another name, transfering the data, dropping the original
table and renaming the new one. Possibly setting the SQL-DMO TextFileGroup
Property will be possible, but I have not tried it.

John
"MrDom" <mr*******@hotmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I am wondering if someone can help solve this question I have a table
in sql server 2000, I setup it using Enterprise manager.

When I generate an SQL Script for this table it scripts as:
CREATE TABLE [dbo].[CubicleConfiguration] (
[CubicleConfigurationID] [int] IDENTITY (1, 1) NOT NULL ,
[Description] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

Which is fine, however when I try to insert that into another database
using query anaylser I get the following error:

Server: Msg 1709, Level 16, State 1, Line 2
Cannot use TEXTIMAGE_ON when a table has no text, ntext, or image
columns.
OK I know I can remove the TEXTIMAGE_ON [PRIMARY] and that solves the
problem, however I have written some scripts to automate script
generation process, and this TEXTIMAGE thing, throws a spanner in the
automation process.

Any to suggestions as to why this is happening?

If I try building a new table manually using enterprise manager
creating the same table definition above, then script it, I get:
CREATE TABLE [dbo].[CubicleConfiguration2] (
[CubicleConfigurationID2] [int] IDENTITY (1, 1) NOT NULL ,
[Description2] [nvarchar] (255) COLLATE Latin1_General_CI_AS NULL
) ON [PRIMARY]
GO

Which is correct and should be generated in the first place

Any ideas as to why enterprise manager decides to add a TEXTIMAGE_ON
[PRIMARY] and break it?

The question is has something in the schema been corrupt?, how do I
return it back to normal?

Jul 23 '05 #2
I don't really know, but what does this return:

select objectproperty(object_id('CubicleConfiguration',
'TableHasTextImage'))

If you get 1, and CubicleConfiguration doesn't have a text column, then
it's likely that there's some sort of metadata corruption - you could
try dropping and recreating the table to see if it fixes the problem.

Alternatively, if that isn't an option for some reason, and if you only
have one filegroup, then you could use the SQLDMOScript2_NoFG constant
to prevent the filegroup clause from being included in your script. (I
assume you're using SQLDMO to generate your scripts - if you're using a
third-party tool, then you'd have to check the documentation for the
tool).

Simon

Jul 23 '05 #3
yes when i ran the above script it did infact return 1.

Jul 23 '05 #4
I checked the the sysindexes for that database and I did infact find
another index, with an indid of 255.

It's strange that the index doesn't show up in enterprise manager, or
DBCC doesn't update it and remove it from the sysindex table.

Thanks for your help guys!

Jul 23 '05 #5
Hi

That is because it is not really an index.

In BOL the documentation for sysindexes/Indid
255 = Entry for tables that have text or image data

I would have thought DBCC CLEANTABLE and/or DBCC CHECKTABLE would have
mopped it up, but it doesn't seem to.

John

"MrDom" <mr*******@hotmail.com> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
I checked the the sysindexes for that database and I did infact find
another index, with an indid of 255.

It's strange that the index doesn't show up in enterprise manager, or
DBCC doesn't update it and remove it from the sysindex table.

Thanks for your help guys!

Jul 23 '05 #6
John Bell (jb************@hotmail.com) writes:
That is because it is not really an index.

In BOL the documentation for sysindexes/Indid
255 = Entry for tables that have text or image data

I would have thought DBCC CLEANTABLE and/or DBCC CHECKTABLE would have
mopped it up, but it doesn't seem to.


This script repros the problem:

CREATE TABLE [dbo].[CubicleConfiguration] (
[CubicleConfigurationID] [int] IDENTITY (1, 1) NOT NULL ,
some_text text,
[Description] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS
NULL
) ON [PRIMARY]
Go
ALTER TABLE CubicleConfiguration DROP COLUMN some_text
go
select objectproperty(object_id('CubicleConfiguration'),
'TableHasTextImage')
go
DROP TABLE CubicleConfiguration

The good news is that SQL 2005 gets it right.

--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #7

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

Similar topics

4
by: nc | last post by:
My iterator can find my collection when my Action class calls my jsp directly, however when my Action class calls an html file that is set up with IFrames (one of which is loading that same jsp), I...
3
by: Drew | last post by:
I am trying to use Bulk Insert for a user that is not sysadmin. I have already set up the user as a member of "bulkadmin". When I run the following script: DECLARE @SQL VARCHAR(1000) CREATE...
10
by: mike | last post by:
regards: I use Jtidy (api) to translate a HTML file into a "XHTML file". But The "XHTML file" cannot be identified by nokia 6600. Do I miss something important? Or this is Jtidy's weakness or...
8
by: baustin75 | last post by:
Posted: Mon Oct 03, 2005 1:41 pm Post subject: cannot mail() in ie only when debugging in php designer 2005 -------------------------------------------------------------------------------- ...
1
by: Matthew Louden | last post by:
I am trying to implement the sort event in data grid. I set the data grid's AllowSorting property = True. I implement the following code that should be the event will fire when the user click any...
7
by: Wayne Brantley | last post by:
I have found what appears to be an error in streaming with Datasets. It causes an error of 'Cannot find relation 0' when recreating the dataset from a stream. Here is how you reproduce it. ...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
3
by: epearce301 | last post by:
Hi, I have table1 and table2, both are linked, and a query has been run. I created forms that use both just the tables, and then another one using just the query. All of the information is there,...
1
by: rdsandy | last post by:
Hi, I have a table Risk, a table Mitigation and a table RiskArchive. I am taking the RiskID, Criticality and MitigationPlan fields from Risk, and MitigationActionID from Mitigation and inserting...
1
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: 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...
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: 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:
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
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.