I was in a hurry when I replied, sorry. As Larry said alter table works but needs exclusive access. Greg's suggestion of modifying the stored proc itself sounds to be a better approach.
Alter sample :
lcTable = 'myTable'
USE (lcTable) exclusive
Open Database (CursorGetProp("Database",lcTable))
lnFields = AFields(arrFlds)
For ix=1 to lnFields
If !Empty(arrFlds[ix,7])
lcColumn = arrFlds[ix,1]
Alter Table (lcTable) alter column &lcColumn drop check
endif
endfor
For ix=1 to lnFields
If !Empty(arrFlds[ix,7])
lcColumn = arrFlds[ix,1]
lcCheck = arrFlds[ix,7]
Alter Table (lcTable) alter column &lcColumn set check &lcCheck
endif
endfor
Cetin
>Hi Cetin,
>
>Thanks for your input. I did a bit of searching in the VFP help file for DBSETPROP and field rules for tables are read-only so it appears that I can't "set validations off" :(
>
>Regards,
>
>Mike
>
>
>>Off the top of my head :
>>-You could set validations off (dbsetprop)
>>Do your work
>>-Restore validations
>>Cetin