Hi,
I'm fairly new to LLBLGen development and am having a problem with the "Save" method on the "Two Class Scenario" generated code. I have hunted through the forum, but couldn't find anything relevant to my problem. The code is fairly simple:
Dim udtRefTypeData As New EntityClasses.ReferenceDataTypesEntity
udtRefTypeData.IsNew = True
udtRefTypeData.ReferenceDataTypeCode = txtRefDataTypeCode.Text
udtRefTypeData.Description = txtRefDataDescription.Text
Dim bolSaveResult As Boolean = udtRefTypeData.Save()
Here's the database structure:
CREATE TABLE [dbo].[tblReferenceDataTypes] (
[ReferenceDataTypeCode] [nvarchar] (50) NOT NULL ,
[Description] [text] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[tblReferenceDataTypes] ADD
CONSTRAINT [PK_ReferenceDataTypes] PRIMARY KEY CLUSTERED
(
[ReferenceDataTypeCode]
) WITH FILLFACTOR = 90 ON [PRIMARY]
GO
The problem I am having is that the "Save" method is returning False (no exception is thrown). However, the record ** does** actually get saved to the database. I believe it could be a problem when the Entity object attempts to re-fetch the data after the save.
This is puzzling me as it seems to behave differently depending on the SQL Server environment. We have a Development SQL Server, on which it operates as expected, with the Save method returning True. However, when I try the same code on the Test SQL Server, the Save method returns False.
The DBA has used a script to create the database on the SQL Test Server. The same script has been run on my local machine's SQL Server. However, When running the above code against my local SQL Server database, all works fine.
Is there any global SQL Server properties, config settings or anything else that could be causing this weirdness?
Also, is there any way of further interrogating what caused the Save method to return False?
Darryl.