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

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.