in reply to Oracle Db Link Error ORA-01001: invalid cursor

If it is the prepare statement failing, it seems likely the problem is with your SQL. You don't show us that so it's hard to tell. Also, are you sure your database connection is being created successfully?

But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)