Table validation texts problem

11010101

Registered User.
Local time
Today, 15:08
Joined
Sep 21, 2005
Messages
11
Hello, I'm new in the Access World. I have a small question, but a bigger problem:

I have a big application developed in Access 97 with more then 200 tables. I wan't to move all the validation rules and texts from back-end to front-end (mean that I wan't to make the validation on the form controls and not directly on the tables like is now). This is needed because in future, I wan't to migrate the application to MSSQL. I wan't to write a piece of code that goes through every form, and for each control in the form, upon the control datasource, get's from database automatically the validation rules and texts and sets them to the control properties.
This is a nice thought, but I'm stuck at the part where I have to get the validation rules and texts for a specific column from a specific table.
Can anyone help me?

Thanks,
Mihai.
 
MSSQL trigger - no solution

Hello, thanks for reply.
I know this solution (MSSQL triggers) BUT as far as I know, the validation texts will not be suported by the MSSQL, nor will be converted automatically by the access upsize wizard.

And, in another order of thoughts, my problem is more deeper. First, I have to convert the application from MS Access 97 to MS Access 2000, and when this conversion is done, some of the tables cannot be converted because their size is too large. The only solution that I found was to remove the validation texts and rules from table definition to code.
 
Solved

Hi, I solved the problem using the ADOX library: the validation texts can be read or set using the next piece of code:

.Columns("Rating").Properties("Jet OLEDB:Column Validation Text") = "Must be between ..."
.Columns("Rating").Properties("Jet OLEDB:Column Validation Rule") = ">0 and < 500"

From all this, I remained with a BIG QUESTION:

- when I convert from Access 97 to 2000, the conversion fails because some tables are too large to be saved in the acces 2000 (if I delete some validation rules or some columns, the tables are saved successfully). Why in the Access 2000 table structure size must be smaller then in Access 97 ??? Or i missed something.
 
Problem stii remaining

Why bother with A2K ? these are the specs but this in not an A2K problem. I also had no problem in transferring the validation rules, the BIG PROBLEM is that the validation texts are not transferred and I don't have any ideea on how to manage them. To copy them from access database in every single form is not a solution - this could take me mounths. If you have any ideea, please reply.
 

Users who are viewing this thread

Back
Top Bottom