-
Hullo once again! I'm accessing a SQL7 database...so far so good. I'd like to validate everything my users try to input before I attempt to update the database. Unfortunately, the fields in the tables can change slightly from time to time (like SmallInt -> Integer, VarChar(200) -> VarChar(500), etc.). Rather than hard-coding each field's definitions, is there a way of getting this info from the DB? And (roughly) how do I use it?
TIA,
Toot
-
Hi Toot you can use the two following pieces of code to get the datatype and size of a field from a recordset
objDbRs.Fields("Fieldname").DataFormat
objDbRs.Fields("Fieldname").DefinedSize
Hope this helps
Ian