Information générale
Titre:
Checking to see in fields exist in database - dbgetprop
I'm writing a utility program to check and see if fields exist in a database and if not, to add them to the database. I also am adding new fields to the database.
I'm using the dbgetprop function to check for fields and if they don't exist I'm using the Alter Table command as follows:
cresults = dbgetprop("client.name", "Field", "defaultvalue")
= messagebox(cresults)
If Len(alltrim(cresults)) = 0
Alter Table client ADD column name c(20) default "Murphy"
Endif
This isn't working. Is there some other way I can check programatically for the existence in a database for fields and their
type and default values.
Any assistance would be greatly appreciated. Thank you
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement