문제

I have an sp with a parameter of smalldatetime datatype. I'm calling my SP through OleDbConnection in my C# code. using OleDbConnection is a requirement so don't answer to change my connection type to SqlConection.

Now my problem is I cannot pass the parameter of type smalldatetime to the sp because OleDbDataType don't have smalldatetime datatype. What's the best DataType to use? or any suggestions? Except changing my connection type to SqlConnection.

도움이 되었습니까?

해결책

OleDbType.DBTimeStamp

it will resolve to the System.DateTime but when you store the data in the database millisconds will not be stored.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top