Tornado - Date Format for MS SQL
Frank,
We're having difficulty figuring out how to format Dates using MS SQL. The errors occur during an 'Add or Update Record operation.
Here are the errors:
System.Data.OleDb.OleDbException: The name '#' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted. at System.Data.OleDb.OleDbDataReader.NextResults(IMul tipleResults imultipleResults, OleDbConnection connection, OleDbCommand command) at System.Data.OleDb.OleDbCommand.ExecuteReaderIntern al(CommandBehavior behavior, String method) at System.Data.OleDb.OleDbCommand.ExecuteNonQuery() at Tornado.Edit.Action_Edit_Execute_SQL(String sql, String which, Int32 recs)
(313 : 7) Error
Edit SQL = INSERT INTO mpoProject (mpoPin,mpoName,CreatedDate,OnStateSystem,WorkType ,County,mpoAgency) VALUES ('000611','Kingston/Ulster',#'1/22/04'#,'[[21]]','Bridge','Albany','City'
I have tried using:
.dbSQLDateFormat = "[M/d/yy H:mm:ss]" with no success. It appears that the # character is causing MS SQL to choke.
Any suggestions?