Don't know what the subject is 
Author Message
 Don't know what the subject is

I am writing a program in VB5 that need to read a .mdb file and perform
some sort of validation. However, the validation rules and the data
(that needs to be validated) may change over time. I'd like to write
an external module such that the program can look for a file (that
contains the code) and perform validation (if the file exists).

This is what I want to do:

I have Table1, Table2, Table3, Table4, Table5 in the .mdb

T1.dat - for validating Table1
T2.dat - for Table2
T3.dat - for Table3, etc.

If T1.dat exists, the program read T1.dat. Do something to Table1.
If T2.dat exists, the program read T2.dat. Do something to Table2.
If T3.dat does not exist, the program do nothing to Table3.

I am wondering if it is possible. If it is, how do I start?
---------------------------------------------------------------------------



Tue, 30 Jan 2001 03:00:00 GMT  
 Don't know what the subject is
I would say validation rules, with exceptions for the title.

You could read in the text file, if it exits first, and store each
validation as a record, or a line, or whatever you find easiest.  Then,
compare that with the table.  Perhaps this sounds too easy for what you're
trying to do, if so, I missed what you wanted.

Table1 has
    FirstName, LastName, Age, Address
T1.dat would contain
"Bodi"
    "Klamph"
 20
    "Canada"

tehn read it in
    Valid1 = line1
    Valid2    = line2
etc...
    with Table1
    If !FirstName = Line1 then
        if !LastName = line2
            etc..
        end if
   end if

Is that what you want?

HTH,

--
Bodi Klamph
Azure Dragon Software

Quote:

>I am writing a program in VB5 that need to read a .mdb file and perform
>some sort of validation. However, the validation rules and the data
>(that needs to be validated) may change over time. I'd like to write
>an external module such that the program can look for a file (that
>contains the code) and perform validation (if the file exists).

>This is what I want to do:

>I have Table1, Table2, Table3, Table4, Table5 in the .mdb

>T1.dat - for validating Table1
>T2.dat - for Table2
>T3.dat - for Table3, etc.

>If T1.dat exists, the program read T1.dat. Do something to Table1.
>If T2.dat exists, the program read T2.dat. Do something to Table2.
>If T3.dat does not exist, the program do nothing to Table3.

>I am wondering if it is possible. If it is, how do I start?
>---------------------------------------------------------------------------


begin 666 Bodi Klamph.vcf
M0D5'24XZ5D-!4D0-"E9%4E-)3TXZ,BXQ#0I..DML86UP:#M";V1I#0I&3CI"
M;V1I($ML86UP: T*3U)'.D%Z=7)E($1R86=O;B!3;V9T=V%R90T*5$E43$4Z

M.SL[.T]N=&%R:6\[.T-A;F%D80T*3$%"14P[5T]22SM%3D-/1$E.1SU154]4
M140M4%))3E1!0DQ%.D]N=&%R:6\],$0],$%#86YA9&$-"D%$4CM(3TU%.CL[
M.SL[.T-A;F%D80T*3$%"14P[2$]-13I#86YA9&$-"D5-04E,.U!2148[24Y4

2,S<S-UH-"D5.1#I60T%21 T*
`
end


Tue, 30 Jan 2001 03:00:00 GMT  
 Don't know what the subject is
You will need to implement your own language for validation.  You'll have to write an expression parser (several simple ones are
aviable freely on the internet) that will evaluate the formula it reads from the .dat file after inserting the values read from the
database.  Your validation formula must be in form of a boolean expression that will return true or false. For example your t1.dat
might contian this line

"((x<=7) and (x>=3))"

then in your vb program you will get a value from table 1 and insert that value (say 11) in the string using string manupultion
functions so that the string becomes:

"((11<=7) and (11>=3))"

Then you will pass this string to an expression parser which will evaluate the string and return False in this case.  Your parsing
function can be complicated if you want to use other validation functions beside just numerical.

Quote:

>I am writing a program in VB5 that need to read a .mdb file and perform
>some sort of validation. However, the validation rules and the data
>(that needs to be validated) may change over time. I'd like to write
>an external module such that the program can look for a file (that
>contains the code) and perform validation (if the file exists).

>This is what I want to do:

>I have Table1, Table2, Table3, Table4, Table5 in the .mdb

>T1.dat - for validating Table1
>T2.dat - for Table2
>T3.dat - for Table3, etc.

>If T1.dat exists, the program read T1.dat. Do something to Table1.
>If T2.dat exists, the program read T2.dat. Do something to Table2.
>If T3.dat does not exist, the program do nothing to Table3.

>I am wondering if it is possible. If it is, how do I start?
>---------------------------------------------------------------------------




Tue, 30 Jan 2001 03:00:00 GMT  
 Don't know what the subject is


Fri, 19 Jun 1992 00:00:00 GMT  
 Don't know what the subject is
Good answer!

Now if I only had a link to that free parser...

Nevermind, here's one, in a book   :)

Quote:

> You will need to implement your own language for validation.  You'll have to write an expression parser (several simple ones are
> aviable freely on the internet) that will evaluate the formula it reads from the .dat file after inserting the values read from the
> database.  Your validation formula must be in form of a boolean expression that will return true or false. For example your t1.dat
> might contian this line

> "((x<=7) and (x>=3))"

> then in your vb program you will get a value from table 1 and insert that value (say 11) in the string using string manupultion
> functions so that the string becomes:

> "((11<=7) and (11>=3))"

> Then you will pass this string to an expression parser which will evaluate the string and return False in this case.  Your parsing
> function can be complicated if you want to use other validation functions beside just numerical.


> >I am writing a program in VB5 that need to read a .mdb file and perform
> >some sort of validation. However, the validation rules and the data
> >(that needs to be validated) may change over time. I'd like to write
> >an external module such that the program can look for a file (that
> >contains the code) and perform validation (if the file exists).

> >This is what I want to do:

> >I have Table1, Table2, Table3, Table4, Table5 in the .mdb

> >T1.dat - for validating Table1
> >T2.dat - for Table2
> >T3.dat - for Table3, etc.

> >If T1.dat exists, the program read T1.dat. Do something to Table1.
> >If T2.dat exists, the program read T2.dat. Do something to Table2.
> >If T3.dat does not exist, the program do nothing to Table3.

> >I am wondering if it is possible. If it is, how do I start?
> >---------------------------------------------------------------------------




Wed, 31 Jan 2001 03:00:00 GMT  
 Don't know what the subject is


Fri, 19 Jun 1992 00:00:00 GMT  
 Don't know what the subject is
Why don't you try using the VB Script control.  (This is available on
Microsofts Web Site).
This would allow you to change the validation when ever you wanted, simply
by sending a different script for the program to execute.


Fri, 02 Feb 2001 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Don't know what the subject is

2. Help-don't know what i'm missing

3. Don't know if i'm in the right newsgroup

4. I am RILLY thick so pleez don't bother replying to this message :)

5. Batch file question (Yes, I know it's off-subject)

6. Don't Know How to Publicly Declare Variable

7. Microsoft Windows 95 don't know calculation

8. Migration to VS 2003 worked though I don't know why

9. Don't tell me no one knows the answer

10. does anybody know why this code don't work

11. Importing files-don't know please help.

12. Don't know how to print Invoice with DATAreport

 

 
Powered by phpBB® Forum Software