Article View: be.comp.programming
Article #1134Re: Sql vraagje
From: Ludo
Date: Thu, 27 Oct 2005 22:18
Date: Thu, 27 Oct 2005 22:18
24 lines
1904 bytes
1904 bytes
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;
FindKey([X]);
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;
Technical Details
Message-ID:
<Zmc8f.33585$L47.1432665@phobos.telenet-ops.be>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.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!news1.google.com!proxad.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: 24 Message-ID: <Zmc8f.33585$L47.1432665@phobos.telenet-ops.be> Date: Thu, 27 Oct 2005 22:18:33 GMT NNTP-Posting-Host: 213.119.103.57 X-Complaints-To: abuse@telenet.be X-Trace: phobos.telenet-ops.be 1130451513 213.119.103.57 (Fri, 28 Oct 2005 00:18:33 MEST) NNTP-Posting-Date: Fri, 28 Oct 2005 00:18:33 MEST Organization: Telenet Internet