S
Stefan Marhauer
Hy group,
i'm developing a compact framework application with VS2003 and using SQL
Server CE2.0
Now i have to change some database structure in my running application.
First i have used a field "fldID" in my table as "int IDENTITY (0,1)" ->auto
increment field. This field is declared as primary key in my table.
Now I have to change the primary key field to a ROWGIUD column. I've added a
new column using uniqueidentifier and ROWGUIDCOL. This also works fine. Now
i want to drop the primary key from the "fldID"-column to set a new primary
key on the GUID-Column.
As described in the documentation of SQLServerCE i used the command
"ALTER TABLE table_name DROP PRIMARY KEY"
But this don't work it always throws an exception "There was an error
parsing the query" and unknown keyword says: "primary"
Hope you could help me. I don't want to copy all data into a new table. :-(
regards
Stefan
i'm developing a compact framework application with VS2003 and using SQL
Server CE2.0
Now i have to change some database structure in my running application.
First i have used a field "fldID" in my table as "int IDENTITY (0,1)" ->auto
increment field. This field is declared as primary key in my table.
Now I have to change the primary key field to a ROWGIUD column. I've added a
new column using uniqueidentifier and ROWGUIDCOL. This also works fine. Now
i want to drop the primary key from the "fldID"-column to set a new primary
key on the GUID-Column.
As described in the documentation of SQLServerCE i used the command
"ALTER TABLE table_name DROP PRIMARY KEY"
But this don't work it always throws an exception "There was an error
parsing the query" and unknown keyword says: "primary"
Hope you could help me. I don't want to copy all data into a new table. :-(
regards
Stefan