Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Cannot use TEXTIMAGE_ON
Message
De
02/08/2011 09:20:45
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Desktop
Divers
Thread ID:
01519881
Message ID:
01519887
Vues:
22
>>>>I am trying to create a table to use the FILESTREAM stuff in SQL Express 2008. Here's my code:
>>>>
>>>>
CREATE TABLE [dbo].[ClaimDocuments](
>>>>	[doc_PK] [uniqueidentifier] NOT NULL,
>>>>	[doc_desc] [varchar](100) NOT NULL,
>>>>	[doc_clmfk] [uniqueidentifier] NOT NULL,
>>>>	[doc_FileGUID] [uniqueidentifier] ROWGUIDCOL NOT NULL,
>>>>	[doc_file] [varbinary](max) FILESTREAM NOT NULL,
>>>> CONSTRAINT [PK_ClaimDocuments] PRIMARY KEY CLUSTERED 
>>>>(
>>>>	[doc_PK] ASC
>>>>)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
>>>>) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] FILESTREAM_ON [FileStreamGroup1]
>>>>
>>>>GO
>>>>
>>>>Note that the last field is varbinary(max).
>>>>
>>>>I am getting this error:
>>>>
>>>>Cannot use TEXTIMAGE_ON when a table has no text, ntext, image, varchar(max), nvarchar(max), varbinary(max), xml or large CLR type columns.
>>>>
>>>>Can someone help me see the trees rather than the forest, please?
>>>
>>>
>>>Can't test this right now, but I think you need UNIQUE ROWGUIDCOL:
>>>
>>>CREATE TABLE [dbo].[ClaimDocuments](
>>>	[doc_PK] [uniqueidentifier] NOT NULL,
>>>	[doc_desc] [varchar](100) NOT NULL,
>>>	[doc_clmfk] [uniqueidentifier] NOT NULL,
>>>	[doc_FileGUID] [uniqueidentifier] ROWGUIDCOL NOT NULL UNIQUE,
>>>	[doc_file] [varbinary](max) FILESTREAM NOT NULL,
>>> CONSTRAINT [PK_ClaimDocuments] PRIMARY KEY CLUSTERED 
>>>(
>>>	[doc_PK] ASC
>>>)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
>>>) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY] FILESTREAM_ON [FileStreamGroup1]
>>>
>>>GO
>>>
>>
>>Thanks but that didn't make a difference (assuming it was just adding the word UNIQUE to the doc_FileGUID field)
>
>I can't test it right now.
>But from Google I saw that you could remove this clause :-)
>
>....
>) ON [PRIMARY] FILESTREAM_ON [FileStreamGroup1]
>
But then, if I understand it correctly I won't use the FileStream, which is what I want to do. I found the original article where I got this from and they don't have the TEXTIMAGE_ON clause and that lets it work. It's weird that the TEXTIMAGE_ON was generated by SSMS from another table if it doesn't work.
Frank.

Frank Cazabon
Samaan Systems Ltd.
www.samaansystems.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform