hello,erveryone~
i met a problem about post a query.
questiontable has the follow column:
code identity(1,1)
question_id int not null
question_name varchar(500) not null
description varchar(500) null
ztime datetime default(getdate()) not null
status bit default(1) not null
here is the component:
selectuniquery.sql.text:='select * from questiontable'
selectuniquery.updateobject:=uniupdatesql;
updatesql.insertobject:=insertuniquery;
insertuniquery.sql.text:='insert into questiontable (quesion_id,quesiton_name) values (:quesiont_id,:question_name)'
selectuniquery.append;
selectuniquery.fieldbyname('question_id'):='1';
selectuniquery.fieldbyname('question_name'):='question1';
selectuniquery.post;
the error is field ztime must has value ~~~
how can i post the dataset ?
sorry for my poor english~~
how to post a query with default value field?
-
sefeng1982
- Posts: 2
- Joined: Thu 22 Jul 2010 10:35