Re: Vertical bar in SQL statement
- From: "Mary Chipman [MSFT]" <mchip@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 16 May 2007 20:25:05 -0400
It's an extended character, so you need to use the asc("|") function
to find out the code, which is 124. Then concatenate chr(124) into the
string.
-Mary
On Mon, 14 May 2007 08:24:00 -0700, JamesFielding
<JamesFielding@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi guys,.
Okay, I know this is going to be an easy one... but I just can't work it
out.
I'm using Jet to connect to an Access database, and want to add data
to a table, containing a vertical bar | character in it.
INSERT INTO tblSomething (TextField) VALUES ('What a || lovely day')
(i.e. I want to insert a piece of text which reads What a || lovely day...
I don't want SQL to do anything clever with this.)
I can't do it.
I just keep getting error messages as Jet seems to be interpreting
the bar, rather than just inserting it as part of the INSERT command.
If I use the same command in, say, SQLCE, it works a treat.
Does anyone know how to get around this issue ?
James
- Prev by Date: Re: Insert Error: Column name or number of supplied values does not match table definition.
- Next by Date: Re: Insert Error: Column name or number of supplied values does not match table definition.
- Previous by thread: Insert Error: Column name or number of supplied values does not match table definition.
- Next by thread: OLE DB Property Sets and Property Groups
- Index(es):