T
trialproduct2004
Hi all,
I am facing one problem while inserting data into table through windows
application.
I am having one table in sql server containing one field for which i
set default value as 'getdate()' while designing that table only.
So when i add reords to that table through sql query analyser no need
of specifying this field.
But when i try to insert data into this table through windows
application it is not inserint current date time into table.
If i set this column as primary key in sql server itself it is working
properly.
But without setting column 'createdon' as primary key , in c#
application i need to set datatable.column["datetime"].defaultvalue as
current date time even though for this column i set default value in
sql server while designing itself. I am not getting why this is
happening.
Can someone shed some light on it.
Thanks in advance.
I am facing one problem while inserting data into table through windows
application.
I am having one table in sql server containing one field for which i
set default value as 'getdate()' while designing that table only.
So when i add reords to that table through sql query analyser no need
of specifying this field.
But when i try to insert data into this table through windows
application it is not inserint current date time into table.
If i set this column as primary key in sql server itself it is working
properly.
But without setting column 'createdon' as primary key , in c#
application i need to set datatable.column["datetime"].defaultvalue as
current date time even though for this column i set default value in
sql server while designing itself. I am not getting why this is
happening.
Can someone shed some light on it.
Thanks in advance.