Delphi32.com - Home!
| Home/News | Downloads | Forums | D32 Magazine | Resources | Info and Facts |  
 
 Sybase/record has been modified by another user error with datetime fields


I have a table in a Sybase database (version 0.x or .x) that has a datetime field. I was able to use/edit data in this table until I applied a patch to my Sybase client (versions affected below). Now after applying the patch, whenever I attempt to update records that were written to the table with the unpatched client I get the error "record has been modified by another user". What is wrong?   

    As of Open Client Version . . , CT-Lib now uses a small datetime as its default. (A small datetime keeps year, month, day, hour & minute). This means that the . . client will not even attempt to send second and millisecond data to the server when you post a record. If the data was written with second and millisecond precision, there is no way of reselecting it using Open Client . . . (for example :30:23. doesn't equal :30:00.000) In versions eariler than this (for example . .0) CT-Lib used long datetime as its default. (A long datetime keeps everything a small datetime does plus seconds and milliseconds). As a result, when you upgrade your Sybase client you will see this problem.

    One possible workaround is to change your Update Mode to be WhereKeyOnly or WhereChanged, but if the datetime field is part of the key or you change the value of the datetime field you will still see this problem. You could also use small datetime fields when you are designing your tables and avoid this problem entirely. If you have a database which requires second and/or millisecond precision for the datetime fields, you have a few options:

    . Use Open Client . .0 or 0.0.4 with CT-Lib 2. Use Open Client . . with DB-Lib 3. Write your own implementation of second and millisecond times in another field and use it in conjunction with a short date.

    If these alternatives are not acceptable to you, we encourage you to provide this feedback to Sybase Customer Service or your Sybase sales representative.

    Versions Affected: Open Client .5, . . , . with ebf7398 applied, 0 with ebf7438.

     



  << Previous Faq     Complete List     Next Faq >>  



 
 Hits/month  2,500,000+ 
 Downloads
 (Since May 2000)
 7,393,709 
 Total Files  6,023 
 Forum msgs  7,670 
 Articles/FAQs  70+/900+ 
Kylix
Tips n Tricks
FAQs
Knowledge Base
Bug Listings
Articles
Books
Newsgroups
Links
Submissions
Testimonials
Advertising
Contact Us
About Us
Search Amazon:
Top Selling Software at Amazon

| Home/News | Downloads | Forums | Resources | Info and Facts | Testimonials |
  Site Search:
 


Comments/Problems: Webmaster@delphi32.com
Copyright © 1998-2006, Delphi32.com. All rights reserved.
Terms of Use