Hello,
I’ve run across a problem for which I can’t seem to find an answer. I have an application that tracks information for permits. There are many different kinds of permits and the application allows you to work between them. The backend database is SQL Server 2008. The application is written in VB.NET 2008.
The sanitary permit is used most often. The sanitary permits form has several datetime pickers that default to 09/09/9998 for a new permit. The user can leave the default or select/enter a new date. If the user doesn’t enter a new date, the dates in SQL become 9998-09-09. When you bring the data back in to the application, it shows as 09/09/9998 in the picker. That all works just fine when the user stays within the sanitary permit type.
When you select a different permit type, add a new permit, and select the sanitary permits again, the dates change from their default of 09/09/9998 to the current date. The other permits use a different form and do not have the number of pickers. I can use MessageBox.show to see the values coming from the database and what values the pickers are set to before the form is displayed. In each case, the values are the defaults (correct and what it should be).
When the form is displayed, the pickers have a value of the current date. If a date other than the default has been entered/selected, the picker’s value does not change. No errors are being thrown and errors are not being caught by a try…catch block.
When you select a different permit type and select a permit to change, and select the sanitary permits again, the pickers do not change. It’s only when a new permit of type other than sanitary is added.
Each picker has the following settings:
Max Date: 12/31/9998
Format: Short
Thank you for any ideas you can give me.
I’ve run across a problem for which I can’t seem to find an answer. I have an application that tracks information for permits. There are many different kinds of permits and the application allows you to work between them. The backend database is SQL Server 2008. The application is written in VB.NET 2008.
The sanitary permit is used most often. The sanitary permits form has several datetime pickers that default to 09/09/9998 for a new permit. The user can leave the default or select/enter a new date. If the user doesn’t enter a new date, the dates in SQL become 9998-09-09. When you bring the data back in to the application, it shows as 09/09/9998 in the picker. That all works just fine when the user stays within the sanitary permit type.
When you select a different permit type, add a new permit, and select the sanitary permits again, the dates change from their default of 09/09/9998 to the current date. The other permits use a different form and do not have the number of pickers. I can use MessageBox.show to see the values coming from the database and what values the pickers are set to before the form is displayed. In each case, the values are the defaults (correct and what it should be).
When the form is displayed, the pickers have a value of the current date. If a date other than the default has been entered/selected, the picker’s value does not change. No errors are being thrown and errors are not being caught by a try…catch block.
When you select a different permit type and select a permit to change, and select the sanitary permits again, the pickers do not change. It’s only when a new permit of type other than sanitary is added.
Each picker has the following settings:
Max Date: 12/31/9998
Format: Short
Thank you for any ideas you can give me.