Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB2 update/delete via MS Access/ODBC gets "no current row" error msg

Status
Not open for further replies.

RCPD700

MIS
Jun 20, 2001
75
US
Rows were appended to a DB2 table by a batch COBOL application and the commit was successful. All rows in the table can subsequently be viewed using MS Access; however, any attempt to update or delete any of those rows gets error message "No current record" despite the row(s) being selected.

If you add rows using MS Access, you can subsequently update/delete them using Access without problem. If you select multiple rows for deletion, only those rows existing before the insert/append or those added with Access get deleted. Message is issued for all others (with the option of suppressing repetitive messages after the first).

Our DBA believes ODBC is not the problem because using the DB2 Command Center on the desktop you can select rows for viewing and update/delete any row you like. WinSQL also works fine... Access 97 and Access 2000 both return that same message.

Are there any security issues that could be causing this? Any other things we could/should check... ideas?

Thanks in advance,
Jim
 
After a fair amount of trial and error testing, we discovered that the problem is due to the precision with which MS Access handles timestamps. In DB2 a full-blown timestamp as input to the table can be 26 bytes formatted as:
ccyy-mm-dd-hh.mm.ss.nnnnnn where nnnnnn is milliseconds.

If data is inserted into a table with a timestamp that contains any significant digits in the rightmost 3 bytes of the milliseconds portion, MS Access will return the "No current record" error message for that row when you attempt to modify or delete it. The solution to the problem therefore is to either enter milliseconds as all zeros, or do not extend milliseconds beyond the third position (thousands position if viewed as a decimal).

I hope this info is helpful.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top