John,

Use a combination of several pieces of data to uniquely identify the row 
you want to affect. For example, use last name and zip code, or use "phone 
number" if you have it. Be aware that you could create a scheme that would 
not guarantee uniqueness. For example, it is possible that you could have 
two of the same last name in the same zip code, so you may add "first name" 
to the query, etc...

You could also write a short CF program to append/prepend a "rowcount" 
number to each row in your database. Then you simply need to remember to 
"manage" this count. The easiest way is to just create a counter (store the 
counter in the flat file as well) that gets updated by one each time you 
insert a new record. You would not re-use any of the numbers, so if you 
deleted the record with "rowcount" 9, then your database would have a 
"hole" there (which is no big deal). Just like NT, its a unique user id - 
if the record is deleted, and the same information is added back it, it 
will be assigned a NEW rowcount.

HTH,
Rusty
GEDesign, Inc.

-----Original Message-----
From:   John Biesnecker [SMTP:[EMAIL PROTECTED]]
Sent:   Tuesday, November 21, 2000 5:07 AM
To:     CF-Server
Subject:        RE:  Primary Key

Ok...  yeah, that makes sense that a flat dbf wouldn't need a primary
key...  but then how do you make Cold Fusion think that there is a primary
key so that I can do update and delete operations on the rows in the
table?

I'm sure it's possible, I just can't find it in the documentation.



John Biesnecker
[EMAIL PROTECTED]

------------------------------------------------------------------------  
------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to