ValidTimeState causing warnings when compiling

When compiling your code you might encounter the following warning: Parameters in the validtimestate clause must match the type that is specified in the ValidTimeStateFieldType property of table <table name>.

Some tables use the time state control, if they do there are two modes for this time state; date and datetime.

When using a select statement for a time state table you use the control validtimestate to filter the records, like below:

Select validtimestate(<date> <table name>

It is important that the date value being passed is set to the same type as setup on the table for time state control. So if the table is set to Date, then the value passed into the validtimestate control should be of type date, and equally for datetime the type should be datetime.

Being of the wrong type will not stop the system from working, but will produce unnecessary warning messages when compiling the system.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s