Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 6 of 6 total |
Deleting records by SQL |
Sat, Jul 24 2010 7:12 AM | Permanent Link |
John Evans | First time playing with ElevateDB.
I have been able to get the tables up and running and displaying data ok. One table contains many extraneous records and I want to delete all the records that don't match a certain criteria. I have added a query to the form with the following SQL: DELETE FROM tblFred WHERE fEvent <> 'Script' When I try to make the Query active I get an 'Error creating table handle' error. I have put some other simple SQL statements in and have been able to make the query active but the above always fails. Any help appreciated. |
Sat, Jul 24 2010 7:39 AM | Permanent Link |
John Evans | I should add that the SQL executes correctly in the EDBManager
|
Sat, Jul 24 2010 7:56 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | John
>When I try to make the Query active I get an 'Error creating table handle' error. > >I have put some other simple SQL statements in and have been able to make the query active but the above always fails. There's nothing different about this type of query than any other. What happens if you simply replace the sql in a query that you know works with the code in this one? Roy Lambert [Team Elevate] |
Sat, Jul 24 2010 8:58 AM | Permanent Link |
Terry Swiers | John,
> When I try to make the Query active I get an 'Error creating table handle' > error. Assuming that you are doing this from inside your code, make sure that you are calling ExecSQL rather than calling Open or setting Active := True. Since this doesn't return a result set, you really can't make it Active. -- --------------------------------------- Terry Swiers Millennium Software, Inc. http://www.1000years.com http://www.atrex.com Now shipping Atrex 13. For more information go to http://www.atrex.com/news.asp Atrex Electronic Support Options: Atrex Knowledgebase: http://www.atrex.com/atrexkb.asp Email: mailto:support@atrex.com Newsgroup: news://news.1000years.com/millennium.atrex Fax: 1-925-829-1851 Phone: 1-925-828-5892 (M-F, 9a-5p Pacific) --------------------------------------- |
Sat, Jul 24 2010 10:25 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | John,
<< When I try to make the Query active I get an 'Error creating table handle' error. >> Terry is correct - ExecSQL for anything that doesn't return a result set, although with EDB you can just use ExecSQL for everything, including SELECT statements, since EDB extends the expected ExecSQL behavior to include automatically opening up any result sets that are returned. -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Jul 24 2010 7:18 PM | Permanent Link |
John Evans | Used only ExecSQL. All good.
Thanks John |
This web page was last updated on Saturday, May 4, 2024 at 12:54 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |