After checking online, the default language of the database can be set to Chinese to solve the problem, but this only solves the string problem of Insert data, not the problem of using date parameters directly in the StoredProcedure storage method. And for the Chinese date input problem, it is necessary to set the entire database code into Chinese, is not a good solution. And it seems that the date pattern invoked in the StoredProcedure does not depend on the default language of the system, but rather on the version language of the database. Fortunately, SQLServer also provides a method to set the default language of Login Login name, so that we can take the Login account to set the default language of Chinese Login, so as to solve the format conversion error idea.
USE MASTER
EXEC SP_DEFAULTLANGUAGE ‘login name ‘, ‘Simplified Chinese’
This method is tested.
Look at the SQLServer tutorial, it seems that the SQLServer 2005 version of the above, can also be used directly
ALTER LOGIN LOGIN name WITH DEFAULT_LANGUAGE = ‘Simplified Chinese’
But this statement did not compile on my SQL EXPRESS 2008.
In this way, after the user USES the set account to log in, the system default language is the set language, the date format conversion error problem is solved.