macromedia.coldfusion.database_access
[Top] [All Lists]

Change DB Primary Key

Subject: Change DB Primary Key
From: "cfwild" <webforumsuser@xxxxxxxxxxxxxx>
Date: Fri, 29 Feb 2008 16:47:50 +0000 (UTC)
Newsgroups: macromedia.coldfusion.database_access

Hi,

 I'm using MS Access for my database.  My table = TempTable has a Primary Key = 
ID.  I need to change the Primary Key to incorporate these fields (Weeks, UPC, 
TimePeriod).  I've tried using something like this, but it isn't working:

 Any thoughts on how to change this would be appreciated!

 cfwild

 <CFQUERY NAME="DBUpdate" DATASOURCE="#DSN#">
                ALTER TABLE TempTable
                DROP PRIMARY KEY,
                ADD PRIMARY KEY (Weeks, UPC, TimePeriod)
        </CFQUERY>


<Prev in Thread] Current Thread [Next in Thread>