Thomas Chabaud a écrit :
> Hello.
>
> I'm using PostgreSQL ODBC Driver v08.01.0100 with Visual Basic 6
> applications.
> When I try an AddNew on a recordset with the following code :
>
> Dim rs As ADODB.Recordset
> Set rs = New ADODB.Recordset
> rs.Open "tRepertoiresParcellaires", dbConn,adOpenKeyset, _
> adLockPessimistic, adCmdTableDirect
>
> rs.AddNew
> rs("myfield").value = "myvalue"
>
> I have always the same error :
> "-2147467259 Error while executing the query;
> ERROR: null value in column "mycolumn" violates not-null constraint"
>
> [...]
I solve the problem by using adCmdTable, it seems to work in this mode.
Thomas