[Lazarus] SF.net 2008 Community choise

peng pengtu321 at gmail.com
Thu Jun 19 23:10:15 CEST 2008


Op zaterdag 14-06-2008 om 16:06 uur [tijdzone -0500], schreef Howard Lee
Harkness:

> However, it doesn't seem to matter what I put in for nbDelete. I
> always get the error "There are no fields found to generate the
> where-clause" if I do ApplyUpdates for nbDelete. If I put nothing in
> there, the field appears to be deleted, but it is still in the table,
> and comes back to the grid when I press "refresh".

Does your table has a primary key? And do you have set the
'UsePrimaryKeyAsKey' property to true?

sqldb tries to create an delete-query for you, but to do that it has to
indentify the record that should be deleted. Normally it uses the
primary key for that. If there is no primary key, you have to tell it
which fields should be included as a 'key'. (ie: be a part of the
where-statement in the delete query: 'delect from table where ...)

Joost.




More information about the Lazarus mailing list