>>What information do you get with aerror() ? Can you show us some code of inserting a record?
>
>
>laError[1,1] = 1429
>laError[1,2] = "OLE IDispatch exception code 0 from Microsoft OLE DB Provider for Visual FoxPro: Trigger failed in Jurosdiv..."
>laError[1,3] = "Trigger failed in Jurosdiv."
>laError[1,4] = "Microsoft OLE DB Provider for Visual FoxPro"
>laError[1,5] = ""
>laError[1,6] = 0
>laError[1,7] = 16389
>
>
>
>
>tcSql = "insert into jurosdiv (jud_cod, jud_aplic, jud_dtfim, jud_dtini, jud_dtncc, jud_padcod, jud_perc, jud_selic, jud_tipo, jud_vlr, jud_selec, jud_jperc, jud_selpag, jud_dijcod, jud_vlrncc, jud_vparc, jud_perpar, jud_perncc) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
>
>This.oCmd.CommandText = tcSql
>loRs = This.oCmd.Execute() && display the error
>
>this.oCmd.Parameters have the collection of correct parameters
>
>
>JurosDiv table are relatad to another table. ADO thinks that the correspondent record dont't have in the parent table, but he have.
>
>I repeat that if I insert from VFP this error don't occours.
What is the trigger code?
I suspect that VFP OleDB can not run the trigger code for some reason. You may try to put some strtofile in different places in the trigger code and see, if you can get some output (e.g. try to log through the trigger code).
If it's not broken, fix it until it is.
My Blog