avelino
|
Posted: 11/06/2003, 7:06 AM |
|
hello:
It's posible put a second field in unique control propertie?
For example: the field unique is CLIENT_ID but depending on field DELEGACION_ID
Thanks
Avelino Alonso
|
|
|
Hamilton
|
Posted: 11/06/2003, 7:29 PM |
|
Avelino,
Tell us more about what it is you are trying to do.
Provide a better example. It's difficult to work out what you're asking about.
|
|
|
Avelino
|
Posted: 11/06/2003, 10:22 PM |
|
HEllo:
when I have defined a field control y a record form width propertie "unique=yes", CCS generate this code:
if(CCDLookUp("COUNT(*)", "clientes", "CODIGOCLI=" . $this->ds->ToSQL($this->ds->CODIGOCLI->GetDBValue(), $this->ds->CODIGOCLI->DataType) . $Where, $DBconvergesrobledo) > 0)$this->CODIGOCLI->Errors->addError("El campo CODIGOCLI ya existe.");
It's posible add a second parameter in where clause (not handcoded in code generated)?
The unique index in table is width two fields (CODIGOCLI and delegacion_id).
For Exa. Updating a record width CODIGOCLI="4300001" respond width a error message record duplicated, but not duplicated really, becose the (CODIGOCLI="4300001") exist width DELEGACION_ID=1 and width DELEGACION_ID=2, and the update affect only DELEGACION_ID=1.
thanks.
Avelino Alonso.
|
|
|
|