View Single Post
 
Old 07-24-2015, 06:55 PM
pschulz pschulz is offline
Newcomer
 
Join Date: Jul 2015
Posts: 6
Question default value for a timestamp field

Hi there,

is there no way to have a timestampColumn within an Insert statement?
I could keep it out of course but sometimes, its needed.

This are 2 examples I've tried, but have still an error
Code:
Dim strTimestamp As String = String.Empty

mySQLCommand.Parameters.AddWithValue("@TimestampClm", SqlDbType.Timestamp)
mySQLCommand.Parameters("@TimestampClm").Value = strTimestamp


And even this one hasnt work
Code:
Dim myNull As SqlDateTime
myNull = SqlDateTime.Null

mySQLCommand.Parameters.AddWithValue("@TimestampClm", SqlDbType.Timestamp)
mySQLCommand.Parameters("@TimestampClm").Value = myNull
greetings and thanks
Reply With Quote