I have but then when I try to save the database it won't let me. Keeps 
saying "Changes to the table you requested were not successful because they
 
would create duplicate values in the index, primary key or relationship. 
Change the data in the firld or fields that contain duplicate data, remove
 
the index, or redefine the index to permit duplicate entries and try again"

The only way I can get it to save is to remove the Primary Key.

Field Name              Data Type
----------------                --------------
profile_ID              Text
env_var         Text
destination             Text





At 03:08 PM 2/5/2002 +0100, you wrote:
>You have to define Profile_ID as Primary Key.
>
>-----Original Message-----
>From: phumes1 [mailto:[EMAIL PROTECTED]]
>Sent: dinsdag 5 februari 2002 14:54
>To: CF-Talk
>Subject: RE: Deleting entries from database
>
>
>Thanks...its works. Problem I'm having now is duplicate entires with the
>
>same ID in my database if I add 2-3 identical entries.
>
>I was having trouble adding entries before when the Profile_ID was set
>to
>No duplicates.
>
>
>
>At 02:25 PM 2/5/2002 +0100, you wrote:
> >You are passing URL.PID to the page. SO:
> >
> >DELETE FROM profile
> >WHERE profile_ID = <cfqueryparam cfsqltype="CF_SQL_VARCHAR"
> >value="#URL.PID#">
> >
> >This assuming profile_ID is a VARCHAR
> >
> >-----Original Message-----
> >From: phumes1 [mailto:[EMAIL PROTECTED]]
> >Sent: dinsdag 5 februari 2002 14:23
> >To: CF-Talk
> >Subject: RE: Deleting entries from database
> >
> >
> >OK..so I have a anchor from my index.cfm file which does a listing of
> >all
> >the fields from the database.
> >
> ><A
> >HREF="env_delete_action.cfm?PID=#GetEnv.Profile_ID#&DID=#GetEnv.en
>v
> >_va
> >r#&DEST=#GetEnv.destination#">[Delete]</A>
> >
> >
> >By clicking on the "Delete" link the variables are passed to another
> >form
> >that I want to perform the delete function.
> >I'm stuck in the WHERE ... I don't want to delete every record!
> >
> ><cfquery name="update_profile" datasource="profiles">
> >          Delete from profile
> >          (profile_ID, env_var, destination)
> >          WHERE ???
> ></cfquery>
> >
> >At 02:05 PM 2/5/2002 +0100, you wrote:
> > >The syntax is incorrect: INSERT INTO ...
> > >
> > >For DELETE:
> > >DELETE FROM table
> > >WHERE your filters   !!!!
> > >
> > >PS don't forget the filters or you delete every record in the table
> > >
> > >-----Original Message-----
> > >From: phumes1 [mailto:[EMAIL PROTECTED]]
> > >Sent: dinsdag 5 februari 2002 14:05
> > >To: CF-Talk
> > >Subject: re: Deleting entries from database
> > >
> > >
> > >Hi,
> > >
> > >I have the following code that inserts fields into my database.
> > >
> > ><cfquery name="update_profile" datasource="profiles">
> > >         Delete into profile
> > >         (profile_ID, env_var, destination)
> > >         VALUES
> > >         ('#FORM.profile_ID#', '#FORM.env_var#',
>'#FORM.destination#')
> > ></cfquery>
> > >
> > >
> > >I would also like to delete entries. Whats the syntax to do so?
> > >
> > >
> >
> >
>
>
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation � $99/Month � Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to