🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Zeosy

#82810
From: konsul41
Date: Fri, 30 Jun 2017 10:50
31 lines
1979 bytes
W dniu 30-06-2017 o 12:29, konsul41@wp.pl pisze:
> Zeos Delphi XE2
>
> Jak ograniczyć ilość wierszy pobieranych do ZTable
> FZTable1.FetchRow:=1;
> FZTable1.Open;


Poradziłem sobie
Query:=TZQuery.Create(nil);
   try

     Query.Connection:=Poczta.ZQPoczta.Connection;
     Query.SQL.Text:='INSERT INTO pliki(dane, typ, nazwapliku, 
id_sprawy,opis) '+
                     ' VALUES (:dane, :typ, :nazwapliku, 
:id_sprawy,:opis) returning id;';
     Query.ParamByName('typ').Text := 'plik';
     Query.ParamByName('nazwapliku').Text := ExtractFileName(filename);
     Query.ParamByName('id_sprawy').AsInteger := 0;
     Query.ParamByName('opis').Text := ExtractFileName(filename);
     Query.ParamByName('dane').LoadFromStream(Stream,ftBlob);
     //BS := Query.CreateBlobStream(Query.FieldByName('dane'),bmWrite);
     //TBlobField(Query.FieldByName('dane')).LoadFromStream(Stream);
     Query.Open;
     result:=Query.FieldByName('id').AsInteger;

     //BS.Free;
   finally
     Query.free;
   end;
Technical Details
Message-ID: <59562d03$0$15198$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <595627ff$0$15201$65785112@news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!goblin1!goblin.stu.neva.ru!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-a-02.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Subject: Re: Zeosy
Newsgroups: pl.comp.lang.delphi.bazy-danych
References: <595627ff$0$15201$65785112@news.neostrada.pl>
From: "konsul41@wp.pl" <konsul41@wp.pl>
Date: Fri, 30 Jun 2017 12:50:43 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0
MIME-Version: 1.0
In-Reply-To: <595627ff$0$15201$65785112@news.neostrada.pl>
Lines: 31
Message-ID: <59562d03$0$15198$65785112@news.neostrada.pl>
Organization: Telekomunikacja Polska
NNTP-Posting-Host: 83.12.127.25
X-Trace: 1498819843 unt-rea-a-02.news.neostrada.pl 15198 83.12.127.25:50308
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit