Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

are the tables the same?

Databases and tables

are the tables the same?

by  danceman  Posted    (Edited  )
This is simple compare tables. My purpose was not to compare each with function calls of FCOUNT(), FSIZE(), but a quick way to ensure that the tables are the same. This was developed to provide a check for an import routine. the process creates to arrays with AFIELDS().
After creating the 2 arrays of each table I compare the arrays.
lstrcmpi compares two strings and is case sensitive. The first compare is the field count return of the AFIELDS().

Declare integer lstrcmpi in kernel32 String, String

if afields(emp,"exam") != afields(oldemp,"oldemp")
wait window "tables are not the same"
return
else
if lstrcmpi(oldemp,emp) != 0
wait window "fields are not the same"
return
endif
endif
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top