Executenonquery is returning -1 for the query which is running correctly in sql/db2 editor
I am trying to insert record for parent and child id in one transaction. When I am running my application all records for parent id are inserting correctly but for child id after some records insertion Command.Executenonquery() is returning -1.I have given command.timeout value still it is not working.
When I am running that same insert query in db2 editor,that is executing successfully. Also I am not able to catch the exception why query fails.
Code is return in VB.Net and database is db2.
Please advise. Thanks!