Tony Rogerson
3/20/2007 7:47:00 AM
Hi Shawn,
How are you inserting data into this table?
Also, make sure the client hasn't changed their database compatibility
level, if its 70 you get this error....
Msg 325, Level 15, State 1, Line 7
Incorrect syntax near 'COLLATE'. You may need to set the compatibility level
of the current database to a higher value to enable this feature. See help
for the stored procedure sp_dbcmptlevel.
On compatibility mode 80 it still works fine...
insert [ROWGUID_Tesat] ( name ) values ( 'adsasda' )
select *
from [ROWGUID_Tesat]
What is the output of PRINT @@VERSION?
What is the output of sp_helpdb <dbname>
Tony.
"Shawn Mason" <shawn@issda.com> wrote in message
news:uamHGeraHHA.596@TK2MSFTNGP06.phx.gbl...
> To duplicate it I simply created a test table using this:
>
> CREATE TABLE [dbo].[ROWGUID_Tesat](
>
> [myROWGUID] [uniqueidentifier] ROWGUIDCOL NOT NULL CONSTRAINT
> [DF_ROWGUID_Tesat_myROWGUID] DEFAULT (newid()),
>
> [name] [varchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
>
> CONSTRAINT [PK_ROWGUID_Tesat] PRIMARY KEY CLUSTERED
>
> (
>
> [myROWGUID] ASC
>
> )WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
>
> ) ON [PRIMARY]
>
>
>
> The above creates a simple 2 column table with the first being the
> uniqueIdentifier with ROWGUID turned on with the NewID() for its default
> value. The second is just a varchar column to fill in something. This
> simple example fails.
>
> Shawn
>
>
> "Tony Rogerson" <tonyrogerson@torver.net> wrote in message
> news:CDE0FD71-5395-4EF8-A557-9AC2627967ED@microsoft.com...
>> How did they 'move' to 2005?
>>
>> My guess is they imported the data using the import/export on management
>> studio and the default property (and a lot of other stuff) hasn't been
>> copied across.
>>
>> You need to post the scripted create table for the problem table.
>>
>> Many thanks,
>> Tony.
>>
>>
>> "Shawn Mason" <shawn@issda.com> wrote in message
>> news:ehdlkEnaHHA.4940@TK2MSFTNGP05.phx.gbl...
>>> Hi,
>>>
>>> I have a client who has used the ROWGUID in 2000 with a NewID() in the
>>> default section. It worked fine in 2000 and creatd the ROWGUID value
>>> for them but after having moved to 2005 this no longer seems to
>>> function.
>>>
>>> Any ideas?
>>>
>>> Shawn
>>>
>>
>
>