Article View: be.comp.programming
Article #1135Re: Sql vraagje
From: Ludo
Date: Thu, 27 Oct 2005 22:41
Date: Thu, 27 Oct 2005 22:41
34 lines
2155 bytes
2155 bytes
Met een verbetering erbij :
Het lukt wel, maar dan wel in 2 slagen : ( volgens mij dan toch ) :
Var A,B,X := Integer;
Query1: TQuery;
begin
Query1 := TQuery.Create(Self);
Query1.SqlConnection := SqlConnection1;
X := 19;
With Query1 do
begin
Sql.Clear;
Sql.Add('Select * From Jouw_Tabel Order By Id');
Open;
if FindKey([X]) then
begin
MoveBy(-1);
A := FieldByName('Id').AsInteger;
MoveBy(2);
B := FieldByName('Id').AsInteger;
Close;
Sql.Clear;
Sql.Add('Select * From Jouw_Tabel Where Id Between A and B' Order By ..
Open;
end
else
begin
ShowMessage('Geen resultaat gevonden ..');
Close;
Free;
end:
end;
Technical Details
Message-ID:
<xIc8f.33597$wM1.1525817@phobos.telenet-ops.be>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed101.telia.com!nf02.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!hwmnpeer01.ams!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mailReferences:
<4360e3b2$0$322$ba620e4c@news.skynet.be> <jw58f.33230$Y45.1572890@phobos.telenet-ops.be> <4360ef18$0$29028$ba620e4c@news.skynet.be> <Ap68f.33262$M%4.1566758@phobos.telenet-ops.be> <436132d2$0$10047$ba620e4c@news.skynet.be>Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,cbd8331c80a6215d X-Google-Attributes: gidfcea4,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!newsfeed101.telia.com!nf02.dk.telia.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!hwmnpeer01.ams!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail From: Ludo <jvbsoft.verwijder@telenet.be> User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) X-Accept-Language: nl-NL, nl, en MIME-Version: 1.0 Newsgroups: be.comp.programming Subject: Re: Sql vraagje References: <4360e3b2$0$322$ba620e4c@news.skynet.be> <jw58f.33230$Y45.1572890@phobos.telenet-ops.be> <4360ef18$0$29028$ba620e4c@news.skynet.be> <Ap68f.33262$M%4.1566758@phobos.telenet-ops.be> <436132d2$0$10047$ba620e4c@news.skynet.be> In-Reply-To: <436132d2$0$10047$ba620e4c@news.skynet.be> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 34 Message-ID: <xIc8f.33597$wM1.1525817@phobos.telenet-ops.be> Date: Thu, 27 Oct 2005 22:41:33 GMT NNTP-Posting-Host: 213.119.103.57 X-Complaints-To: abuse@telenet.be X-Trace: phobos.telenet-ops.be 1130452893 213.119.103.57 (Fri, 28 Oct 2005 00:41:33 MEST) NNTP-Posting-Date: Fri, 28 Oct 2005 00:41:33 MEST Organization: Telenet Internet