🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.delphi.bazy-danych
Article #70511

Re: Znaki specjalne w kwerendzie SQL

#70511
From: zpk
Date: Wed, 08 Aug 2007 09:16
26 lines
1963 bytes
On 7 Sie, 15:59, Magda S <sowama...@vp.pl> wrote:
> Magda S napisał(a):
>
> > Sorry za tak elementarne pytanie, ale naprawdę nie wiem.
>
> > Jak w kwerendzie SQL (np. klauzuli VALUES) wpisać znaki "niedrukowalne",
> > na przykład znak #0 (chodzi o aktualizację pola BLOB).
>
> Już wiem. Przecież jest funkcja CHAR.

A po co funkcja char?
Przy wpisywaniu stringu zawierającego znaki secjalne (w tym o kodzie
0) zastosuj parametryzację sql,

np.

sql:='insert into tab (str) values (:str)';

i następnie

paramByName('str).asString:='Ala'#0'ma kota';

Na pewno zapisze się znak o kodzie 0 wraz z 'ma kota' :)

Pozdrawiam-
Paweł Krzyżanowski
Technical Details
Message-ID: <1186564573.429263.21290@q75g2000hsh.googlegroups.com>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!news.uni-stuttgart.de!news.stw-bonn.de!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.freenet.de!feeder.news-service.com!feeder3.cambrium.nl!feed.tweaknews.nl!postnews.google.com!q75g2000hsh.googlegroups.com!not-for-mail
References: <f8dbhe$9g5$1@news.onet.pl><f99ts0$4i4$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!news.nask.pl!news.nask.org.pl!news.uni-stuttgart.de!news.stw-bonn.de!news.netcologne.de!newsfeed-fusi2.netcologne.de!newsfeed.freenet.de!feeder.news-service.com!feeder3.cambrium.nl!feed.tweaknews.nl!postnews.google.com!q75g2000hsh.googlegroups.com!not-for-mail
From: zpk <zpksoft@op.pl>
Newsgroups: pl.comp.lang.delphi.bazy-danych
Subject: Re: Znaki specjalne w kwerendzie SQL
Date: Wed, 08 Aug 2007 02:16:13 -0700
Organization: http://groups.google.com
Lines: 28
Message-ID: <1186564573.429263.21290@q75g2000hsh.googlegroups.com>
References: <f8dbhe$9g5$1@news.onet.pl><f99ts0$4i4$1@news.onet.pl>
NNTP-Posting-Host: 83.8.25.212
Mime-Version: 1.0
X-Trace: posting.google.com 1186564573 12509 127.0.0.1 (8 Aug 2007 09:16:13 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Wed, 8 Aug 2007 09:16:13 +0000 (UTC)
In-Reply-To: <f99ts0$4i4$1@news.onet.pl>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe),gzip(gfe)
Complaints-To: groups-abuse@google.com
Injection-Info: q75g2000hsh.googlegroups.com; posting-host=83.8.25.212;   posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit