简体   繁体   中英

send sql server Timestamp from C#

Does someone knows how can I send a Timestamp value from C# to my Sql stored procedure which expect to get a timestamp value?

the sp looks like this

create sp1(@TS Timestamp)

--do do something...

go

MySqlCommand command = new MySqlCommand(); command.CommandText =@"sp1";
command.CommandType = CommandType.StoredProcedure;

command.Parameters.Add("@TS", MySqlType.TimeStamp, 15).Value = DateTime.Now;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM