TQuery.SQL generates error "Does not return a result set" - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

TQuery.SQL generates error "Does not return a result set"

When I active a query (TQuery or TADOQuery) with SQL commands such as
"Delete", "Insert", "Update" ...
it returns an error "Does not return a result set"
So I must use commands Insert, Delete of the Dataset instead o SQL commands.
Help me please, please help me !!!

Comments

  • pritaeaspritaeas Posts: 274Member
    : When I active a query (TQuery or TADOQuery) with SQL commands such as
    : "Delete", "Insert", "Update" ...
    : it returns an error "Does not return a result set"
    : So I must use commands Insert, Delete of the Dataset instead o SQL
    : commands.
    : Help me please, please help me !!!

    Quote:

    TQuery has a property called SQL, which is used to store the SQL statement. TQuery encapsulates one or more SQL statements, executes them and provides methods by which we can manipulate the results. Queries can be divided into two categories: those that produce result sets (such as a SELECT statement), and those that don't (such as an UPDATE or INSERT statement). Use TQuery.Open to execute a query that produces a result set; use TQuery.ExecSQL to execute queries that do not produce result sets.


    Quote taken from:

    http://delphi.about.com/library/weekly/aa060199.htm

    hth, pritaeas
Sign In or Register to comment.