inserting "\" & chr$(10) in MSSQL

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dom (Dom_at_discussions.microsoft.com)
Date: 09/10/04


Date: Fri, 10 Sep 2004 07:15:03 -0700


I try to insert a string out of vb 6.0 which contains a backslash, followed
by chr$(10) (linefeed).

if I insert for example strTest = "bla\" & chr$(10) mssql writes only "bla"
to
the table.
If I insert "bla\\" & chr$(10) & chr$(10) mssql writes "bla\" & chr$(10) to
the table.

Why ??? Do I really have to filter the combination of "\" & chr$(10) and
replace it
with "\\" & chr$(10) & chr$(10) before every update and insert ?
enormous performance loss..... ?

can anyone tell me, why MSSQL behaves like this if I insert this two
characters and
if there are any other combinations which i need to be aware of ?



Relevant Pages

  • Re: String literals in Java
    ... """ can have escape sequences like ... any normal string. ... characters: a backslash and a lowercase "n". ...
    (comp.lang.java.programmer)
  • Re: SendKey problem with doubleused keys
    ... > one of the backslash characters is changed to its correspondent 'non Alt Gr' ... > the real case of the string characters given to be sent. ...
    (microsoft.public.vb.winapi)
  • Re: Newbie need help
    ... you just lucked out by using a different string. ... the source translator to construct special characters. ... backslash followed by a lower case t. ... because '\t' is the tab character, ...
    (comp.lang.python)
  • SendKey problem with doubleused keys
    ... one of the backslash characters is changed to its correspondent 'non Alt Gr' ... the real case of the string characters given to be sent. ...
    (microsoft.public.vb.winapi)
  • Re: gfortran diagnostics and so on
    ... Well, in f0003, backslash is part of the standard Fortran character set. ... Because the backslash is part of the standard Fortran character set, the default behavior should be the printable character, **NOT** some kind of magic introductory character that transforms the interpretation of following character. ... The one I like best is to use one of the popular extensions to designate a particular literal string according to the C language. ...
    (comp.lang.fortran)