Delphi Error Creating Cursor Handle
Contents |
Swedish Traditional Chinese Turkish | Location All Other RegionsASEANAustralia/New ZealandBeneluxD-A-CHGreater ChinaLatin AmericaNordicTaiwanUK and IrelandUS and CaribbeanCountriesBrazilCanadaFranceIndiaItalyJapanKorea (South)Russian FederationSpain Embarcadero Home Watch, Follow, & Connect with Us Share This
Delphi Sql Error Creating Cursor Handle
Communities Articles Blogs Resources Downloads Help Submit Translation Printer-friendly EDN » error creating cursor handle stored procedure Delphi » Database Show All [All] Getting 'Error creating cursor handle' when using TStoredProc By: Borland Staff Abstract: This error occurs, because the application tried to execute an SQL statement and retrieve a to execute an SQL statement and retrieve a result set that did not exist. Problem: When using TStoredProc and try to execute an InterBase stored procedure the error 'Error creating cursor handle' is generated. Solution: This error is the message that accompanies an ENoResultSet exeception thrown by the BDE. This error occurs, because the application tried to execute an SQL statement and retrieve a result set that did not exist. When using TStoredProcs with InterBase execute procedures the application must use the TStoredProc.ExecProc method instead of the TStoredProc.Open method (or setting active property to true). (See Data Definition Guide for more information on execute stored procedures) Latest Comments View AllAdd NewRSSATOM Move mouse over comment to see the full text Reply Posted by Stephen Schaff on May 25 2004Getting 'Error creating cursor handle' when using TStoredProcI admit to small amounts of knowlege when it comes to stored procedures and TDataSets. But I am getting this message when I try to call .Active := true on my TDataSet NOT a TQuerry and NOT a... Rating Average rating: 2.5 Votes: 0 1 1 0 0 Rating: 1 2 3 4 5 1=Poor, 5=Excellent Download Trial Buy Now Download Delphi10 now! Webinars on demand! More social media choices: Delphi on Google+ @RADTools on Twitter Server Response from: ETNASC03 Copyright© 1994 - 2013 Embarcadero Technologies, Inc. All rights reserved. Site Map Developer Tools Blackfish SQL C++B
for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Ask a Question Ask for Help Receive Real-Time Help Create a Freelance Project Hire for a Full Time Job Ways to Get Help Expand Search Submit Close Search Login Join Today Products BackProducts Gigs Live Careers Vendor Services Groups Website Testing Store Headlines Experts Exchange > Questions > Error creating cursor handle Want to Advertise Here? Solved Error creating cursor handle Posted on 1998-08-13 Delphi 1 Verified Solution 6 Comments 1,672 Views Last Modified: 2012-08-13 Hi I have a query, which are supposed to update all the entries in a table. The tablename is brukertb and is a http://edn.embarcadero.com/article/25392 Paradox table. The field which I try to update, is a logical field which I try to set to be False. When I try running it, I get the message "Error creating cursor handle" Here's my code: query1.sql.Clear; query1.sql.Add ('update brukertb set Def_signatur=False'); query1.open; I've tried several things, but can't find out to solve this. Thanx for all help! 0 Question by:bear040497 Facebook Twitter LinkedIn Google LVL 2 Best Solution by333 bear, when you https://www.experts-exchange.com/questions/10072099/Error-creating-cursor-handle.html execute SELECT statement, you must use Query1.Open or Query1.Active=True. When you execute UPDATE, INSERT, DELETE, etc., you must use Query1.ExecSql. So your code must look like this: Go to Solution 6 Comments LVL 10 Overall: Level 10 Delphi 6 Message Expert Comment by:viktornet1998-08-13 I'm not sure, because I'm not much into DBase, but isn't your code suppose to look like this... query1.open; query1.sql.Clear; query1.sql.Add ('update brukertb set Def_signatur=False'); .instead of your way that is query1.sql.Clear; query1.sql.Add ('update brukertb set Def_signatur=False'); query1.open; ------------------- Regards, Viktor Ivanov 0 LVL 2 Overall: Level 2 Delphi 1 Message Accepted Solution by:3331998-08-14 bear, when you execute SELECT statement, you must use Query1.Open or Query1.Active=True. When you execute UPDATE, INSERT, DELETE, etc., you must use Query1.ExecSql. So your code must look like this: Query1.Sql.Clear; Query1.Sql.Add('update brukertb set Def_signatur=False'); Query1.ExecSql; AP 0 LVL 2 Overall: Level 2 Delphi 1 Message Expert Comment by:3331998-08-14 P.S. Viktor, Query.Open executes Sql statement. If Sql property is emty, Query.Open fails. AP 0 LVL 10 Overall: Level 10 Delphi 6 Message Expert Comment by:viktornet1998-08-14 As I said I still don't know much abouy DBase, but doesn't a person have to open first a query, before he starts clearing, reading and stuff...??? Regards, Viktor Ivanov 0 LVL 2 Overall: Le
Join INTELLIGENT WORK FORUMSFOR COMPUTER PROFESSIONALS Log In Come Join Us! Are you aComputer / IT professional?Join Tek-Tips Forums! Talk With Other Members Be Notified Of ResponsesTo Your Posts Keyword Search One-Click Access To http://www.tek-tips.com/viewthread.cfm?qid=1015 YourFavorite Forums Automated SignaturesOn Your Posts Best Of All, It's Free! Join Us! http://computer-programming-forum.com/30-delphi&databases/ffe768fd37d42f0d.htm *Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail. Posting Guidelines Promoting, selling, recruiting, coursework and thesis posting is forbidden.Tek-Tips Posting Policies Jobs Jobs from Indeed What: Where: jobs by Link To This Forum! Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.Just copy error creating and paste the BBCode HTML Markdown MediaWiki reStructuredText code below into your site. Embarcadero: Delphi Forum at Tek-Tips HomeForumsProgrammersDevelopment ToolsEmbarcadero: Delphi Forum 'Error Creating Cursor Handle' thread102-1015 Forum Search FAQs Links MVPs 'Error Creating Cursor Handle' 'Error Creating Cursor Handle' igc (MIS) (OP) 29 Mar 99 02:20 'Error Creating Cursor Handle' Does anybody know what this means. Ihave a project with around 15 TQuery or TTable comps error creating cursor on it. everything was fine, then i added one more TQuery to do an INSERT and i getthe above error every time i try to activate it, the INSERT still works, i just get the error after. TQuerys doing insert that were added before this one still work ok and if a add a TQuery and do a SELECT that is ok. any ideas? RE: 'Error Creating Cursor Handle' cmd (Programmer) 21 Apr 99 20:44 When you execute an SQL query that returns a result set, such as a SELECT statement, use TQuery.Open. An INSERT statement (and UPDATE, DELETE, etc.) which doesn't return a result set, should be executed with the TQuery.ExecSQL method. The error you are receiving indicates that the BDE is not able to create a cursor on the result set from the query, in this case, because there was no result set returned. RE: 'Error Creating Cursor Handle' speak (Programmer) 17 Jun 99 17:30 I seem to get this error periodically. Usually it's because I have forgotton to place the DataBase Name on the TQuery object. Red Flag This Post Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or
following SQL statements I get the message Error Creating Cursor Handle. 1) Insert into ItemsSold Select Items.* From Items Where Status = "Sold"; 2) Delete From Items Where Status = "Sold"; Both statements are in separate queries that run in an onclose event of a form. I then cannot close the form. If I view the tables afterwards the data has been inserted/deleted many thanks Andy Law Wed, 18 Jun 1902 08:00:00 GMT Jan Oon#2 / 4 Error Creating Cursor Handle-----Please Help Quote:>Whenever I try run the following SQL statements I get the message >Error Creating Cursor Handle. >1) >Insert into ItemsSold >Select Items.* >From Items >Where Status = "Sold"; >2) >Delete From Items >Where Status = "Sold"; >Both statements are in separate queries that run in an onclose event >of a form. I then cannot close the form. >If I view the tables afterwards the data has been inserted/deleted I also experienced this but it's nothing serious I think. Just put the SQL.Open around a Try .. Except block. I think this error is because no resultset is returned because you it's an insert/delete SQL so no cursor can be created... Greetings Jan Oonk Codim BV The Netherlands Wed, 18 Jun 1902 08:00:00 GMT Marcai#3 / 4 Error Creating Cursor Handle-----Please Help Quote:>Insert into ItemsSold >Select Items.* >From Items >Where Status = "Sold"; >2) >Delete From Items >Where Status = "Sold"; Try ExecSQL instead of Open / Close Query.SQL.Add('Insert into ItemsSold Select Items.*'); Query.SQL.Add('From Items Where Status = ''Sold'''): Query.ExecSQL; Wed, 18 Jun 1902 08:00:00 GMT Kirk Gra#4 / 4 Error Creating Cursor Handle-----Please Help I assumne U R opening the query using the open statment. This expects SQl that will return a recordset. Use execsql instead, this is provided for insert, delete and update statments. Cheers, Kirk. Quote: > >Whenever I try run the following SQL statements I get the message > >Error Creating Cursor Handle. > >1) > >Insert into It