Board index » delphi » Error creating handle with a SQL INSERT query

Error creating handle with a SQL INSERT query

        I tried to create an INSERT SQL query, a very simple one, but which I
really need. Since I'm not a very good SQL-programmer, I first created that
query with the QBE of Paradox. The QBE query worked properly, so I tried to use
its SQL translation, which is provided by Paradox. With Paradox, this SQL query
went on working properly. But when inserted in the SQL property of a Tquery
object, I couldn't make this object active : a message "Error when creating
cursor handle" appeared. If you know the reason why, and the way to solve that
problem, it would be very helpful?
        Thanks in advance. My e-mail is duran...@worldnet.fr     :-)

 

Re:Error creating handle with a SQL INSERT query


On 20 Mar 1998 15:17:43 GMT, duran...@worldnet.fr (gouy) wrote:

Quote
>    I tried to create an INSERT SQL query...But when inserted in the SQL
>property of a Tquery object, I couldn't make this object active : a message
>"Error when creating cursor handle" appeared. If you know the reason why,
>and the way to solve that problem, it would be very helpful?

For SELECT queries, which return a cursor to data, activate the TQuery with
the Active property or the Open method. For all other types of queries,
execute the SQL statement using the ExecSQL method.

**************************************************************************
Steve Koterski
Borland International, Inc.
http://www.borland.com/delphi
(Remove the "SPICEDHAM2" from the address. Death to spam-bots!)

Re:Error creating handle with a SQL INSERT query


To run a query that does not return a result set use TQuery.ExecSQL.  Do not
set the Active property to True or call TQuery.Open.

--
Bill

(TeamB cannot answer questions received via email.)
(To contact me for any other reason remove nospam from my address)

Other Threads