I thought that if I had a field in the form set up as type date, it would do date checking, regardless of the variable type it is returning it to in the input statement.
If I have to code specific input statements for the data types, this kind of blows this whole idea apart.
The intent is to to be able to create "questionnaires" for our clients quickly and easily. This is for data they want to keep, not necessarily something we want to code screens into our product for. So I want to create a generic system for the user to give us their list of questions, we populate a configuration table and now they can start inputting their data in a matter of hours. Much easier than coding screens, Genero code, table changes, etc.
To do this, I wanted to create a dynamic form. From question to question, we don't know what data type it will be. Might be date, might be integer, whatever it is configured to be. So that's why I need to set up the form on-the-fly. And I would like the advantages of the data checking.
But if I can only do this by matching the input variables to the same type a the form, then it's a major problem.
Imagine I have 5 questions on the screen. And let's say we code for 4 different types: integer, date, char, and decimal. Just with those 4 types, I'd have to code 1024 different input statements. One for int, int, int, int, int - One for int, int, int, int, date - One for int, int, int, date, int - One for ..., and so on.
And if I'm doing all of that work, I might as well have custom forms for each permutation as well. But that's unfeasible.
I thought the type of field on the form controlled all the checking, not what variable type I'm using in the INPUT. And a varchar should be able to hold and receive a date, integer, decimal, etc. And the table to hold the answers would be varchar as well.
But if that's not doable, then this whole idea isn't.