Pergunta

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.

Foi útil?

Solução

OleDbType.DBTimeStamp

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top