boardtc
asked on
Deleting from a query
In porting a d1 project to d3 I have found problems with code that deletes from a query. No I get a table is read only message. The query does not return a live result set even if requestlive is set to True as Order By is used. Anyway, I don't want a live result set I simply want to be ablt to delete some records from the query that I couldn't do with SQL. How can I set the query up so this is possible? Thanks, Tom.
You could use a TUpdateSql to achieve what you want.
Look at it's help its explained right easily.
I've never used it but I know it should be done with that.
I hope it helps.
Jeurk
Look at it's help its explained right easily.
I've never used it but I know it should be done with that.
I hope it helps.
Jeurk
ASKER
Hi,
I do not use a TUpDateSql as like I said I do not wish to update the TTable. KE, I did not understand what you were saying. I need to work with the modified query but not write the changes to the database.
Thanks, Tom.
I do not use a TUpDateSql as like I said I do not wish to update the TTable. KE, I did not understand what you were saying. I need to work with the modified query but not write the changes to the database.
Thanks, Tom.
Hi,
Pleas supply the SQL Statment.
(By the way you don't use Query.Open, do you?)
Pleas supply the SQL Statment.
(By the way you don't use Query.Open, do you?)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Vladika, I knew there had to be a way, thanks a million, that works perfectly.
Tom.
Tom.
You can also choose to update your table in a TTable, and get a unique identifier from your query for the TTable.
Lets say, you construct a huge query which would never be able to return a live set, no matter what you do. If your query at the same time request some unique row ID's, you can use these ID's in a TTable to delete/modify these rows.
Supply the query statement if you can't live without a live result set ;-) I'll see then if I can point out any non live-set aspects in it.