close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 21 years ago

Closed 21 years ago

#76 closed defect (invalid)

Sentences with queries altering the tables of a database return an error

Reported by: imendez Owned by: manuelb
Priority: normal Milestone:
Component: DataBase Version: head
Severity: normal Keywords:
Cc:

Description

Sentences with queries altering the tables of a database, such as truncate,
create or drop, return an error like this:


ERROR: SqlDBExecQuery
Fallo en la query:

truncate table EMuMovHist2

Change History (2)

comment:1 Changed 21 years ago by manuelb

Status: newassigned

comment:2 Changed 21 years ago by manuelb

Resolution: invalid
Status: assignedclosed

Really DBExecQuery is not returning an error.

DBExecQuery returns the number of rows that the query affected/returned in the
database. Therefore, there are two different situations that may confuse the
TOL programmer:

1.- Any query can return/affect zero rows and still having been correct.
2.- Any call that involves a drop, create or truncate query will ALLWAYS
return a zero result.

From DBExecQuery help (In Spanish, sorry):

"Ejecuta una orden SQL de tipo inserción, borrado o actualización y
devuelve el número de registros afectados
Devuelve -1 en caso de error."


The bug is invalid, but has come to show some good ideas for the new
implementation.

Note: See TracTickets for help on using tickets.