Hello, I'm testing Unidac. I have made a simple application to query one table. I use Uniquery.
SQL = select * from TableX
SQLInsert = insert into TableX, not all fields.
When I try to execute an insert, I get an exception of (FieldX is required), but FieldX is not part of the insert statement.
What do I have to take into account with this components for such operation?
Understanding component UniQuery
Re: Understanding component UniQuery
Hello,
We can't reproduce the problem. The below code works with no errors. Please modify the code, so that the error is reproduced. In addition, specify the database you are working with.
We can't reproduce the problem. The below code works with no errors. Please modify the code, so that the error is reproduced. In addition, specify the database you are working with.
Code: Select all
UniConnection1.ExecSQL('CREATE TABLE DEPT (DEPTNO INTEGER NOT NULL, DNAME VARCHAR(14), LOC VARCHAR(13), PRIMARY KEY (DEPTNO))');
UniQuery1.SQL.Text := 'Select * from dept';
UniQuery1.SQLInsert.Text := 'INSERT INTO DEPT(DEPTNO) values(:DEPTNO)';
UniQuery1.Open;
UniQuery1.Append;
UniQuery1.FieldByName('deptno').AsInteger := 1;
UniQuery1.Post;