Board index » delphi » [SQL-DMO] BeginAlter, DoAlter and Refresh problem
Costi Stan
Delphi Developer |
[SQL-DMO] BeginAlter, DoAlter and Refresh problem2004-08-10 11:32:34 PM delphi1 I'm opening a table and call BeginAlter and before closing my application, I call DoAlter. Between these calls, I need to reset the identity property of a column. I do it by removing the column, creating a new one with the same props and rename it afterwards. After this block of operations I need to call Refresh on the table (with the default parameter BOOL bReleaseMemberObjects = FALSE). But this call breaks the alter state. Testing with table.InAlter returns false and DoAlter say that there were no changes (so the block Begin and DoAlter is lost). If I am not calling Refresh, the DoAlter would rise an exception with the message: "Column names in each table must be unique. Column name 'temp 1' in table 'dbo.test1' is specified more than once." Is there any other way to refresh columns properties? and rearrange references? Thanks, Costi |