GUID as foreign key


Author
Message
Chan
Chan
Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)Advanced StrataFrame User (725 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I am using GUID as PK in master table. I have another table which is 1-many relationship. When I save my child table, it hit error as below. Any ideas?



I have set mastertable.PK and childtable.FK as GUID in BO mapper.



Please advice.





--Conversion failed when converting from a character string to uniqueidentifier.



exec sp_executesql N'INSERT INTO [dbo].[Books] ([ItemID], [PublisherID], [LanguageID], [PaperTypeID]) VALUES (@ItemID, @PublisherID, @LanguageID, @PaperTypeID);

',N'@ItemID uniqueidentifier,@PublisherID uniqueidentifier,@LanguageID int,@PaperTypeID

int',@ItemID='264FA570-8942-4FD2-BF3D-590D9F7C2464',@PublisherID='494AE887-A731-42A9-8890-10AA147FAECD',@LanguageID=0,@PaperTypeID=0

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