🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #3225

Re: asp probleem

#3225
From: Gunter Schelfhout
Date: Tue, 20 Jan 2004 10:49
23 lines
1942 bytes
Jibe wrote:

> Ik moet via een asp pagina zoeken in een access databank. Alles werkt
> perfect tot wanneer ik zoek op namen met een ' in. Hoe kan ik zorgen dat
> hij in het sql commando de ' toch goed doorgeeft. Ik heb het al geprobeerd
> met een \' in het sql commando maar dat blijkt niet te lukken. Hier dus
> een voorbeeld sql commando:
> "SELECT NOM_NAAM FROM PROFESS WHERE NOM_NAAM LIKE '" & Naam "';"
> Het probleem is dus dat als in de variabele naam een ' voorkomt hij dus
> die eerste ' afsluit.

Ken niks van asp en access, maar dit wordt normaal opgelost door te escapen.
In de shell gebeurt bv dit door de '\'.
bv
$foo wordt aanzien in de shell als een variabele, maar \$foo wordt aanzien
als letterlijk '$foo'.
Of asp hetzelfde escape-teken gebruikt, weet ik niet.
-- 
Blood, sweat & tears

Linus Torvalds about the GPL:
"It's not just a crazy idea that some lefty Commie hippie dreamed up in a
drug-induced stupor."
Technical Details
Message-ID: <BI7Pb.20824$Gu2.4003883@phobos.telenet-ops.be>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp.abs.net!news-out.cwix.com!newsfeed.cwix.com!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
References: <400d04fc$0$1122$6c56d894@feed0.news.be.easynet.net>

Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit
X-Google-Thread: fcea4,642d517a2447e98d
X-Google-Attributes: gidfcea4,public
X-Google-ArrivalTime: 2004-01-20 02:49:05 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!nntp.abs.net!news-out.cwix.com!newsfeed.cwix.com!ossa.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
From: Gunter Schelfhout <nospam@please.com>
Subject: Re: asp probleem
Newsgroups: be.comp.programming
References: <400d04fc$0$1122$6c56d894@feed0.news.be.easynet.net>
Lines: 23
User-Agent: KNode/0.7.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7Bit
Message-ID: <BI7Pb.20824$Gu2.4003883@phobos.telenet-ops.be>
Date: Tue, 20 Jan 2004 10:49:05 GMT
NNTP-Posting-Host: 213.118.155.190
X-Complaints-To: abuse@telenet.be
X-Trace: phobos.telenet-ops.be 1074595745 213.118.155.190 (Tue, 20 Jan 2004 11:49:05 MET)
NNTP-Posting-Date: Tue, 20 Jan 2004 11:49:05 MET
Organization: Telenet Internet