I have been experiencing a problem with date fields which can be null and are being inserted into the database with the value 01/01/1900, is there a way in whcih I can insert a value on NULL (the database column allows nulls)?
My Insert code is contained in a server-side script that gets called when a user presses a button, the lines whcih insert the values into the database are as follows:
sqlQuery = string.Format("INSERT INTO cProjectSuccessTaskDetails (successTask_id, dateCompleted, folder_id) " +
"Values({0},'{1}','{2}')",
formData.selected_listID, Mstm.FormatDateTime(System.DateTime.Now, "yyyy-MMM-dd hh:mm"), folderId);
I am not familiar enough with C Sharp to be able to know how to do this, or even what I should be searching for. If anyone is able to provide resources or the type of script that is required and that will work with the way in which the insert query is used I would be greatly appreciative.
If there is anyonther information that you require please dont hesitate in contacting me.
Thanks,
Matt