CREATE TABLE [dbo].[User](
[Id] [int] NOT NULL,
[UserName] [nvarchar](20) NOT NULL,
[TrueName] [nvarchar](20) NOT NULL,
[Password] [nvarchar](60) NOT NULL,
[Department] [int] NOT NULL,
[Mobile] [nvarchar](20) NULL,
[Telephone] [nvarchar](20) NULL,
[Remark] [nvarchar](200) NULL,
[Enabled] [bit] NOT NULL,
[Available] [bit] NOT NULL,
CONSTRAINT [PK_User] PRIMARY KEY CLUSTERED
(
[Id] ASC
) ON [PRIMARY]
) ON [PRIMARY]
There was only one record in it:
INSERT INTO [User] VALUES(1,N'SUP',N'Jim',N'213123',1,NULL,NULL,NULL,1,1)
After I executed this script:UPDATE [User] SET UserName=N'f',TrueName=N'gg',[Password]=N'dfsdfsdf',Mobile=NULL,Telephone=NULL,Remark=NULL,
Enabled=1 WHERE [Id]=1 AND Available=1
The value of 'Available' field changed to Zero.That was not supposed to happen.
I'm pretty sure it is a bug, because when I did the same thing in Sql Server 2005, everything was correct.
Anybody can tell me if this is a known bug? I searched google,but couldn't find any answer.
Thanks!
"The value of 'Available' field changed to Zero"
Nope. Does not happened when i try it on my SQL Server 2000. It is still 1.
|||Thank you for trying it. But it went wrong on my machine. I also tried
in several other machines(all had service pack4 installed). They all
changed the 'Available' field.
Weirdly enough, when I changed the table structure, for example ,
changing the nvarchar field to nchar or cutting away the 'Enabled'
field, the bug disappeared.
Can anybody else try it? Please|||
Hi Okay,
No issues running on a 2k sp4 machine here.
Cheers
Rob
|||Robert Varga wrote: Hi Okay,
No issues running on a 2k sp4 machine here.
Cheers
Rob
Not win2000 sp4. I meant Sql Server 2000 sp4. The system is XP sp2.|||
Yes, that's what I meant: 2k = 2000, sp4
|||Mine is Personal Edition.I tried on Developer Edition just now, it didn't happen. Maybe that's the reason.
No comments:
Post a Comment