|
||||||
| ASP, ASP.NET and Coldfusion Microsoft's Web Development Language (ASP/ASP.NET) and Coldfusion discussion |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Hey,
I have a case where I fill a datatable with two column wich contain datetime. Il filled them and everything seems alright in debug. Problem is that when I update with the SQLAdapter, it says that it cannot insert NULL into a datetime column, but the fact is that it is not NULL. Here what it looks like: SqlConnection conn = new SqlConnection(ConfigurationManager.AppSettings["BD"]); conn.Open(); adapter.InsertCommand = new SqlCommand("Commun.SP__PeriodeEnregistrer", conn); adapter.InsertCommand.CommandType = CommandType.StoredProcedure; adapter.InsertCommand.Parameters.Add("@idperiode", SqlDbType.Int, 10, "IDPeriode"); adapter.InsertCommand.Parameters.Add("@nosemaine", SqlDbType.Int,10,"NoSemaine"); adapter.InsertCommand.Parameters.Add("@annee", SqlDbType.Int, 10, "Annee"); adapter.InsertCommand.Parameters.Add("@periode", SqlDbType.Int, 10, "Periode_no"); adapter.InsertCommand.Parameters.Add("@datedebut", SqlDbType.DateTime, 150, "Debut_date"); adapter.InsertCommand.Parameters.Add("@datefin", SqlDbType.DateTime, 150, "Fin_date"); adapter.Update(dtPeriode); Thanks in advance |
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|