Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
Run Mode screen as follows; Save(Button)
 
Date Session CK RK MK Gs VB SJ

1/1/2013 1 REO PH2 TFC
 

 
Date Base Design as follows;
 
Date Datetime
Session number
Course Text
Faculty_Code Text
 
In database i want to save the above output as follows;
 
Date session Course Faculty_Code
1/1/2013 1 REo CK
1/1/2013 1 PH2 RK
1/1/2013 1 TFC MK
1/12013 1 GS
1/12013 1 VB
1/1/2013 1 Sj
 
i saved the insert values in the database it is working. i want to save null values in the database.
 
it is a windows application using c sharp.
 
how can i do.
 
when i click the save button output i get already as follows in datagridview;
 

Date session Course Faculty_Code
1/1/2013 1 REo CK
1/1/2013 1 PH2 RK
1/1/2013 1 TFC MK
 
Then i want to null values also in the database also as follows.
 
1/12013 1 GS
1/12013 1 VB
1/1/2013 1 Sj
Posted 30-Jan-13 7:26am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You need to use a query to save data in the database.
 
To save null values
1) Make sure the columns in the tables allow saving nulls.
2) Go ahead and save values in these fields using the query.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 30 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100