A
ahmeddc
Guest
HI
I tried to add new rows to the database SQL 2014 with the following stored procedure
A problem happened to me while saving the date field
ERROR

Time tool DateTimePicker that causes an error The error occurs if the date is like this for today's date

But if the date is before the 13th, no errors will occur

Note, some users have a date and time in Arabic and others have a time and date language in English. I want a way to match both languages.
Dim com As New SqlCommand()
com.CommandType = CommandType.StoredProcedure
com.CommandText = "ADDCLIENT"
com.Parameters.AddWithValue("@CLIENT_ID", SqlDbType.Int).Value = CLIENTUPDATE.LAB_IDVAL.Text
com.Parameters.AddWithValue("@CLIENT_CODE", SqlDbType.NVarChar).Value = CLIENTUPDATE.LAB_CODEVAL.Text
com.Parameters.AddWithValue("@CLIENT_DATE", SqlDbType.Date).Value = CLIENTUPDATE.DATATIM_DATERECOR.Value.ToShortDateString
com.Parameters.AddWithValue("@CLIENT_ACTIVE", SqlDbType.Bit).Value = True
com.Connection = con
con.Open()
com.ExecuteNonQuery()
con.Close()
Continue reading...
I tried to add new rows to the database SQL 2014 with the following stored procedure
A problem happened to me while saving the date field
ERROR

Time tool DateTimePicker that causes an error The error occurs if the date is like this for today's date

But if the date is before the 13th, no errors will occur

Note, some users have a date and time in Arabic and others have a time and date language in English. I want a way to match both languages.
Dim com As New SqlCommand()
com.CommandType = CommandType.StoredProcedure
com.CommandText = "ADDCLIENT"
com.Parameters.AddWithValue("@CLIENT_ID", SqlDbType.Int).Value = CLIENTUPDATE.LAB_IDVAL.Text
com.Parameters.AddWithValue("@CLIENT_CODE", SqlDbType.NVarChar).Value = CLIENTUPDATE.LAB_CODEVAL.Text
com.Parameters.AddWithValue("@CLIENT_DATE", SqlDbType.Date).Value = CLIENTUPDATE.DATATIM_DATERECOR.Value.ToShortDateString
com.Parameters.AddWithValue("@CLIENT_ACTIVE", SqlDbType.Bit).Value = True
com.Connection = con
con.Open()
com.ExecuteNonQuery()
con.Close()
Continue reading...