Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2009-09-24 : 12:47:11
|
| Hello,I have the following:create table dbo.Documents( Id int identity not null, Created datetime not null, [Key] uniqueidentifier not null rowguidcol constraintU_Documents_Key unique constraint DF_Documents_Key default newid(), [File] varbinary(max) filestream constraint DF_Documents_File default(0x), constraint PK_Documents primary key clustered(Id)}I think I need the uniqueidentifier to use Filestream ... But when Icreate a record I get:00000000-0000-0000-0000-000000000000What am I doing wrong?Thanks,Miguel |
|
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2009-09-24 : 18:33:46
|
| Can we see the INSERT stement that you are using to populate the record?=======================================Men build too many walls and not enough bridges. -Isaac Newton, philosopher and mathematician (1642-1727) |
 |
|
|
shapper
Constraint Violating Yak Guru
450 Posts |
Posted - 2009-09-25 : 06:36:55
|
| I found the problem. It was not my SQL code.I am using Entity Framework and the problem was there.You need to decide on EF if the value should be generated by the database or by EF.Thank You,Miguel |
 |
|
|
|
|
|