I have the following table in the database:
Code: Select all
PERSON
{
CODE INTEGER (PRIMARY KEY),
NAME VARCHAR
}
Code: Select all
function NewPerson(const Name: string): Integer;
var
Stmt: IZPreparedStatement;
Rs: IZResultSet;
begin
Stmt := Conn.PrepareStatement('SELECT CODE, NAME FROM PERSON');
Rs := Stmt.ExecuteQueryPrepared;
Rs.MoveToInsertRow;
Rs.UpdateString(2, Name);
Rs.InsertRow;
Result := Rs.GetInt(1);
end;
This is a bug?
Tanks,
Josimar