DateTime mydate = Convert.ToDateTime(this.TextBox1.Text.ToString());当数据库中的类型为DateTime。当textbox为空时,就会报错:该字符未被识别为有效的DateTime。请问:我怎么向数据库中插入空的DateTime型数据?
Powered by: 博客园 Copyright © 2024 (NineTyNine) Powered by .NET 9.0 on Kubernetes