This is a discussion on Re: Manual commit ODBC transactions? within the Informix forums, part of the Database Server Software category; --> --0__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: multipart/alternative; Boundary="1__=08BBE416DFC79EE78f9e8a93df938690918c 08BBE416DFC79EE7" --1__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: text/plain; charset=US-ASCII Hi Rob, I am not very familiar with ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| --0__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: multipart/alternative; Boundary="1__=08BBE416DFC79EE78f9e8a93df938690918c 08BBE416DFC79EE7" --1__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: text/plain; charset=US-ASCII Hi Rob, I am not very familiar with ODBCExpress. However, I would like to give you an idea about how you can do the same using small ODBC application. First of all you have to make sure what type of database you are dealing with i.e. logging, bufferd logging or ANSI. For more info pl. refer your Server Administrator's Guide. http://publib.boulder.ibm.com/epubs/pdf/ct1ucna.pdf You might also want to refer IBM Informix ODBC Programmers's manual, see page #56-57. http://publib.boulder.ibm.com/epubs/pdf/ct1ufna.pdf For example lets assume you are working with ANSI database, your ODBC C app would look like as follows to perform the manual commit. Create your DSN with default settings. That means let the "Auto Commit Optimization" check box be checked. 1. Allocate required handles. 2. SQLConenct/SQLDriverConnect ( ...."connect with ANSI database" .....); 3. Set SQL_ATTR_AUTOCOMMIT attribute to SQL_AUTOCOMMIT_OFF using SQLSetConnectAttr. 4. Allocate statement handle. 5. Execute "Begin work;" using SQLExecDirect(); // This will start the transaction. 6. Do whatever you want ....select, insert, update etc. 7. Execute SQLEndTran either with SQL_ROLLBACK or SQL_COMMIT. // This will end the transaction after performing the necessary operation. 8. Do necessary cleanup. I am hoping if you are connecting to ANSI database then even using ODBCExpress you should be able to run it successfully, if you are sure that the above steps are being taken care under the cover. HTH Thanks -Shesh Rob <nospam@nowhere.c To: informix-list@iiug.org om> cc: Sent by: Subject: Manual commit ODBC transactions? owner-informix-li st@iiug.org 04/27/2004 07:44 AM Please respond to Rob Hello, When attempting a manual commit, I receive a "Driver not capable" error message. Is it possible to use manual transactions with Informix v9.4 and ODBC driver v3.82 ? I tried the ODBC advanced setup option "Auto commit optimization" both ways with the same result. I am using ODBCExpress with StartTransact(), Commit(), and EndTransact() sequence to manually manage transactions. This works great with MSSQL. Is there a better ODBC driver available? Rob. --1__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: text/html; charset=US-ASCII Content-Disposition: inline <html><body> <p>Hi Rob,<br> <br> I am not very familiar with ODBCExpress. However, I would like to give you an idea about how you can do the same using small ODBC application.<br> <br> First of all you have to make sure what type of database you are dealing with i.e. logging, bufferd logging or ANSI. For more info pl. refer your<br> Server Administrator's Guide. <a href="http://publib.boulder.ibm.com/epubs/pdf/ct1ucna.pdf">http://publib.boulder.ibm.com/epubs/pdf/ct1ucna.pdf</a><br> <br> You might also want to refer IBM Informix ODBC Programmers's manual, see page #56-57. <a href="http://publib.boulder.ibm.com/epubs/pdf/ct1ufna.pdf">http://publib.boulder.ibm.com/epubs/pdf/ct1ufna.pdf</a><br> <br> For example lets assume you are working with ANSI database, your ODBC C app would look like as follows to perform the manual commit.<br> <br> Create your DSN with default settings. That means let the "Auto Commit Optimization" check box be checked.<br> <br> 1. Allocate required handles.<br> 2. SQLConenct/SQLDriverConnect ( ...."connect with ANSI database" .....);<br> 3. Set SQL_ATTR_AUTOCOMMIT attribute to SQL_AUTOCOMMIT_OFF using SQLSetConnectAttr.<br> 4. Allocate statement handle.<br> 5. Execute "Begin work;" using SQLExecDirect(); // This will start the transaction.<br> 6. Do whatever you want ....select, insert, update etc.<br> 7. Execute SQLEndTran either with SQL_ROLLBACK or SQL_COMMIT. // This will end the transaction after performing the necessary operation.<br> 8. Do necessary cleanup.<br> <br> I am hoping if you are connecting to ANSI database then even using ODBCExpress you should be able to run it successfully, if you are sure<br> that the above steps are being taken care under the cover.<br> <br> HTH<br> <br> Thanks<br> -Shesh<br> <br> <img src="cid:10__=08BBE416DFC79EE78f9e8a93df938@us.ibm .com" width="16" height="16" alt="Inactive hide details for Rob <nospam@nowhere.com>">Rob <nospam@nowhere.com><br> <br> <br> <table V5DOTBL=true width="100%" border="0" cellspacing="0" cellpadding="0"> <tr valign="top"><td width="1%"><img src="cid:20__=08BBE416DFC79EE78f9e8a93df938@us.ibm .com" border="0" height="1" width="72" alt=""><br> </td><td style="background-image:url(cid:30__=08BBE416DFC79EE78f9e8a93df938@u s.ibm.com); background-repeat: no-repeat; " width="1%"><img src="cid:20__=08BBE416DFC79EE78f9e8a93df938@us.ibm .com" border="0" height="1" width="225" alt=""><br> <ul> <ul> <ul> <ul><b><font size="2">Rob <nospam@nowhere.com></font></b><br> <font size="2">Sent by: owner-informix-list@iiug.org</font> <p><font size="2">04/27/2004 07:44 AM</font><br> <font size="2">Please respond to Rob</font></ul> </ul> </ul> </ul> </td><td width="100%"><img src="cid:20__=08BBE416DFC79EE78f9e8a93df938@us.ibm .com" border="0" height="1" width="1" alt=""><br> <font size="1" face="Arial"> </font><br> <font size="2"> To: </font><font size="2">informix-list@iiug.org</font><br> <font size="2"> cc: </font><br> <font size="2"> Subject: </font><font size="2">Manual commit ODBC transactions?</font></td></tr> </table> <br> <br> <font face="Courier New"><br> Hello,<br> <br> When attempting a manual commit, I receive a "Driver not capable" error <br> message.<br> <br> Is it possible to use manual transactions with Informix v9.4 and ODBC <br> driver v3.82 ? I tried the ODBC advanced setup option "Auto commit <br> optimization" both ways with the same result.<br> <br> I am using ODBCExpress with StartTransact(), Commit(), and EndTransact() <br> sequence to manually manage transactions. This works great with MSSQL.<br> <br> Is there a better ODBC driver available?<br> <br> Rob.<br> </font> </body></html> --1__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7-- --0__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: image/gif; name="graycol.gif" Content-Disposition: inline; filename="graycol.gif" Content-ID: <10__=08BBE416DFC79EE78f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAAQAKECAMzMzAAAAP///wAAACH5BAEAAAIALAAAAAAQABAAAAIXlI+py+0PopwxUbpu ZRfKZ2zgSJbmSRYAIf4fT3B0aW1pemVkIGJ5IFVsZWFkIFNtYX J0U2F2ZXIhAAA7 --0__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: image/gif; name="ecblank.gif" Content-Disposition: inline; filename="ecblank.gif" Content-ID: <20__=08BBE416DFC79EE78f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhEAABAIAAAAAAAP///yH5BAEAAAEALAAAAAAQAAEAAAIEjI8ZBQA7 --0__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7 Content-type: image/gif; name="pic24621.gif" Content-Disposition: inline; filename="pic24621.gif" Content-ID: <30__=08BBE416DFC79EE78f9e8a93df938@us.ibm.com> Content-transfer-encoding: base64 R0lGODlhWABDALP/AAAAAK04Qf79/o+Gm7WuwlNObwoJFCsoSMDAwGFsmIuezf///wAAAAAAAAAA AAAAACH5BAEAAAgALAAAAABYAEMAQAT/EMlJq704682770RiFMRinqggEUNSHIchG0BCfHhOjAuh EDeUqTASLCbBhQrhG7xis2j0lssNDopE4jfIJhDaggI8YB1sZe ZgLVA9YVCpnGagVjV171aRVrYR RghXcAGFhoUETwYxcXNyADJ3GlcSKGAwLwllVC1vjIUHBWsFil KQdI8GA5IcpApeJQt8L09lmgkH LZikoU5wjqcyAMMFrJIDPAKvCFletKSev1HBw8KrxtjZ2tvc3d 5VyKtCKW3jfz4uMKmq3xu4N0nK BVoJQmx2LGVOmrqNjjJf2hHAQo/eDwJGTKhQMcgQEEAnEjFS98+RnW3smGkZU6ncCWav/4wYOnAI TihRL/4FEwbp28BXMMcoscQCVxlepL4IGDSCyJyVQOu0o7CjmLN50OZl qWmyFy5/6yBBuji0AxFR M00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WtR0zGu24I4KbMQm3lnVu2oNWxI9W/lcyzA+mCKF4DBikxb/+UWtOGRiFP8qEwAayIgIA Ow== --0__=08BBE416DFC79EE78f9e8a93df938690918c08BBE416DF C79EE7-- sending to informix-list |