how to alter table conditionally

Does some one know how to check the column size and type by using mySQL?

emailAddress VARCHAR(64)

vs

emailAddress VARCHAR(256)

Between versions of the database I need to determine if I should issue a mySQL ALTER table command if the size is 64 so that I can make it 256.

FieldSchema returns a recordset whose 5th field is the length (for varchar - fieldtype in field 2 = “5”).

  dim rs as RecordSet
  rs= db.FieldSchema("table1")
  while not rs.EOF
    listbox1.AddRow rs.IdxField(1).StringValue, rs.IdxField(2).StringValue, rs.IdxField(5).StringValue
    rs.MoveNext
  wend