Millennium

zhaozj2021-02-17  44

Not long ago, a statistical software was prepared, using the VB6.0 Access 97 database, debugging under Windows2000, all functioning is normal, and there is no significant bug. So I was released. . . . . .

After a month, the user reflects that the data before the 12th is not statistically in the 12th statistics function. I am very strange. Take it back to debug, everything is normal, not as statistics before the 12th of the month they say. So to the field investigation. It is really normal to get it completely, but it is still normal in the system that I am here. *? * The system is analyzed between the systems and differences between us. We use Win2000, users use Win98. So I found a 98 and discovered the fault. But look carefully, there is no way to write wrong, and you can work normally in 2000. So carefully analyze the database, found that the date data in the Access 97 database in 98 uses YY / MM / DD form, but according to Microsoft's explanation, the year was recognized as 20xX year before 45 years, should there be no problem? However, in the database operation window, it is found that the year was modified. For example, 2001-4-12, the storage form is 01/04/12, but it is changed to 12/04/01, so that the program reads out is 2012-4-1. However, 01/04/13 system is considered to be 2001-4-13, which is correct. There is no such problem in Windows 2000, so the above situation has occurred.

How to solve it? After many trials, this issue can be solved using the format function into the DD / MM / YY format with the format function. The reason is very strange, Windows98 can be expressed in two ways to each after the date of the 13th. That is, the two formats of YY / MM / DD and DD / MM / YY can be correctly identified, and the date before 12 days can only be DD / MM / YY format. The program written in this way cannot be running normally under Windows2000 Chinese version (I haven't tried it). So you want to be able to compatibility with 2000 must judge the operating system type and then use different formats. This old cover killed Win98 millennium, but he did not kill the millennium. I don't know if there is another millennium in a millennium. Since the software expires in 2010, I have not tested in a hurry. When the netizen is interested, I can test it, tell me!

转载请注明原文地址:https://www.9cbs.com/read-30619.html

New Post(0)