Primary Keys in StrataFrame/SQL Server 2005


Author
Message
Lance Tofsrud
Lance Tofsrud
StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)StrataFrame Beginner (32 reputation)
Group: Forum Members
Posts: 12, Visits: 21
Hi everyone,

I have finally managed to set aside some time to review StrataFrame and I am getting somewhat frustrated on how StrataFrame handles inserts; more specifically on handling the primary key.

I have tried setting the Primary Key in SQL Server as a uniqueidentifier and then setting the PrimaryKeyIsAutoIncremented property to False.

I have tried setting the Primary Key in SQL Server as an integer while leaving the primary key to be auto-incremented (Same property as above on the object's property).

I keep getting the error indicating that it cannot insert NULL into my primary key column; therefore the save fails. I have tried to recreate the business object and I am unsure why it is trying to jam a number into that field.

Is there a recommended way for setting up PKs in SQL Server and StrataFrame?Unsure

Thanks!

Lance

BusinessLayerException
 An error occurred while saving an the data to the server.


DataLayerSavingException
 Cannot insert the value NULL into column 'StockIdentifier', table 'ObserverTest.dbo.Stocks'; column does not allow nulls. INSERT fails.
Operand type clash: uniqueidentifier is incompatible with numeric
The statement has been terminated.


SqlException
 Cannot insert the value NULL into column 'StockIdentifier', table 'ObserverTest.dbo.Stocks'; column does not allow nulls. INSERT fails.
Operand type clash: uniqueidentifier is incompatible with numeric
The statement has been terminated.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search