I have problem with oleDB \n \r parsing.
I want to pass multi-line string to database. Query looks line this:
"{call merge_procedure(12345, 'Datum poskytnutí '||chr(13)||chr(10)||' dokumentace')}"
but command execution fails on
Unspecified error
at System.Data.OleDb.OleDbCommand.ProcessResults(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.InitializeCommand(CommandBehavior behavior, Boolean throwifnotsupported)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method)
at System.Data.OleDb.OleDbCommand.ExecuteNonQuery()
Could you please help me, how to pass multi-line string to database using oleDB?
As Wernfried Domscheit wrote in a comment, if I bond parameters it works.
call merge_procedure(12345, {0})
or in C#
string.Format("call merge_procedure(12345, 'Datum poskytnutí {0} dokumentace'))", Environment.NewLine);