keynes
asked on
How to use update(SQL) statement in delphi?
I want to use a SQL statement like this:
'update fixasset set assetstatus='0' where assetstatus='F' '
I want to write it in delphi program. I don't want to use store procedure. I write it in TQuery but it not work. Can you tell the details of how to do so???
'update fixasset set assetstatus='0' where assetstatus='F' '
I want to write it in delphi program. I don't want to use store procedure. I write it in TQuery but it not work. Can you tell the details of how to do so???
What is the query.CacheUpdates?
When using that kind of statement in a TQuery component, you must call it by issuing:
Query1.ExecSQL;
It will not work if you call "Query1.Open" or "Query1.Active := true".
Are you getting any error messages?
Alex
Query1.ExecSQL;
It will not work if you call "Query1.Open" or "Query1.Active := true".
Are you getting any error messages?
Alex
ASKER
I use execsql.
But it returned a error message
'Table is read-only.'
But it returned a error message
'Table is read-only.'
hi keynes,
execsql is the way, after fired you can get with the property rowsaffected how much records are updated.
>'Table is read-only.'
what database do you use?
meikl
execsql is the way, after fired you can get with the property rowsaffected how much records are updated.
>'Table is read-only.'
what database do you use?
meikl
did update priv of Table fixasset grant ti user?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks everybody.
Could you tell us what you needed to do to fix it?
Seems to me RBertora's answer did not contribute to the information already supplied by other experts...
Cheers,
Raymond.
Seems to me RBertora's answer did not contribute to the information already supplied by other experts...
Cheers,
Raymond.
Ditto.
keynes, why did you accept RBertora's answer since all he/she said had already been said by other experts?
Alex
keynes, why did you accept RBertora's answer since all he/she said had already been said by other experts?
Alex
Keynes, did you read me question?
Perhaps you could post you code that does no work?
Cheers,
Raymond.