Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Transaction Enlistment problem with Informix

Transaction Enlistment problem with Informix

Transaction Enlistment problem with Informix

 I've the following situation:

 Database Tables :
 * Clients | Cols: Number (serial) , Name (Char 20)
 * History | Cols: ClientNumber (integer),testing (char 10)
 The column number it's related with the column ClientNumber
 in the History table.

 I've Component X with a function that :
 - opens a connection, insert a new client , close the
 connection and call setcomplete.

 I've a component Y with a function that receives
 a client number, opens a connection, execute an insert
 statement on table history with the client number, close
 the connection and call setcomplete.

 Now I'm trying to develop a component that :
 - call both functions from the other components
 - call setcomplete.

 All the components have the transaction property set
 to "Requires transaction".
 The problem is that when I call the function of the
 component Y I catch this error:
 "[Informix][Informix ODBC Driver][Informix]
  Missing key in referenced table for referential
  constraint (informix.historyclient)."
 With the SQL server as the backend the second function
 is able to see the new Client but with Informix the
 component Y doesn't seem to be enlisted in the new

 Any comment or suggestion ?
 Tanks for further help.



RE: Transaction Enlistment problem with Informix

I have the same problem (with Client SDK 2.60) and reported this to informix but got no answer yet.

As my evaluations showed the error message depends on the client SDK of informix. Last result was that the actual (2.70) SDK is not able to make any connection from inside a transactional component.

If you find any hint how to solve this problem please inform me as soon as possible.

RE: Transaction Enlistment problem with Informix


 Well I've 2 work arounds for this but I only tryed one

 the 1st solution is to create a module with a similar
 function to keep the connection opened. If you use the
 same connection you will be able to see committed changes
 in the method.

 2nd solution)
( I didn't try it but I think that it will work )
 an MTS component that it statefull.
 The component has 3 methods:
 - Open connection ( Calls enablecommit )
 - ExecuteSQLStatement( Calls enablecommit )
 - Close connection ( Calls setcomplete )

 This solution presents a small perfomance but it doesn't
 change the aplication architecture.

 Comments ?


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close