I've connected to a Oracle Database. Generated the LLBLGen projects using the Adapter approuch. But I can't make the Build-in field validation to work.
I've tested in a table (GROUP) with two fields:
CD_GROUP: PK Varchar2(10) NOT NULL
DS_GROUP: Unique Varchar2(50) NOT NULL
Made a test application with only one form and one button that retreives a record, updates the DS_GROUP field to become null and tries to save it.
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Try
Dim groupEntity As New DAL.Adapter.EntityClasses.TsGroupEntity
groupEntity.CdGroup = "SPC2" 'I set the PK value for the record to fetch
Dim daa As New DAL.Adapter.DatabaseSpecific.DataAccessAdapter
daa.FetchEntity(groupEntity) 'Fetch the record
'Entity Fields:
' groupEntity.CdGroup = "SPC2" NOT NULL
' groupEntity.DsGroup = "SPC222" NOT NULL
groupEntity.DsGroup = String.Empty ' Clear the description
daa.SaveEntity(groupEntity) 'Try to save and an oracle client exeption is thrown
Catch ex As Exception
MessageBox.Show(ex.Message) 'Oracle's ORA-01407: no se puede actualizar ("BBR2"."TS_GROUP"."DS_GROUP") a un valor NULL
End Try
End Sub
But I keep on getting an exception with the Oracle's ORA-01407 instead of the Build-in field validation.
Any Help?