Article View: comp.lang.pascal.delphi.misc
Article #63Re: sql in delphi
From: Bj�rge S�ther
Date: Tue, 16 Jan 2001 22:55
Date: Tue, 16 Jan 2001 22:55
52 lines
3373 bytes
3373 bytes
"Van Tyghem Sean" <Van.tyghem.sean@uunet.be> skrev i melding
news:3a64cc10.6250067@news.uunet.be...
> Hello,
>
> I'm working with d5 and paradox db
> I have a table with several fields, one of them is a memo field.
> The application first searches via a TQuery in a table for the correct
record,
> displays the memo in a DBmemo, and if I click the update checkbox, I copy
it in
> a normal memo. There I can modify the text and click a button to actually
do the
Why don't you do the modifications in the DBMemo ? That's what DB controls
are for...need to specify RequestLive:=true to be able to do this.
If you want a kind of "cancel" or "undo", set CachedUpdates:=true for your
dataset, and do an ApplyUpdates call when everything is OK (CancelUpdates if
not).
> update of the memo
>
> This is my sql-statement
> UPDATE "Table" Table is the name of the table, no alias
(directory)
> set Memo = :VarMemo Memo is field memo in table
> where Int = :VarInt Int is an integer field
>
>
> This code is in the onclick event of the button
> QRY_Update.paramByName('VarMemo').AsMemo:= MEM_Memo.Text;
> QRY_Update.paramByName('VarInt').ASinteger:= Number;
> QRY_Update.ExecSQL;
>
> Now here is my problem
> If I look wats in the table after I did the update, everything is ok,
but
> after I close the application, no update has been done.
>
> Can anyone show me what I'm doing wrong
You may actually have overwritten the memofield with the unmodified version.
Close the dataset that holds the memo-field, or position at another record
(Paradox locks 1 row at a time) before doing the update call.
Just my 2 cents...;-)
--
Bjoerge Saether
Consultant / Developer
http://www.itte.no
Asker, Norway
bjorgeremovethis@itte.no (remove the obvious)
Technical Details
Message-ID:
<Ap496.7410$wt2.77028@news1.oke.nextra.no>Path:
arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!grolier!newsfeeds.belnet.be!news.belnet.be!skynet.be!news.algonet.se!algonet!newsfeed1.bredband.com!bredband!newsfeed01.se.dataphone.net!nntp.se.dataphone.net!news.powertech.no!news2.oke.nextra.no!nextra.com!news1.oke.nextra.no.POSTED!not-for-mailReferences:
<3a64cc10.6250067@news.uunet.be>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ffff5,12a4d2806f41ac6e X-Google-Attributes: gidffff5,public X-Google-Thread: ff75c,12a4d2806f41ac6e X-Google-Attributes: gidff75c,public X-Google-Thread: 10baee,12a4d2806f41ac6e X-Google-Attributes: gid10baee,public X-Google-Thread: 115d96,12a4d2806f41ac6e X-Google-Attributes: gid115d96,public X-Google-ArrivalTime: 2001-01-16 15:04:05 PST Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!freenix!fr.clara.net!heighliner.fr.clara.net!grolier!newsfeeds.belnet.be!news.belnet.be!skynet.be!news.algonet.se!algonet!newsfeed1.bredband.com!bredband!newsfeed01.se.dataphone.net!nntp.se.dataphone.net!news.powertech.no!news2.oke.nextra.no!nextra.com!news1.oke.nextra.no.POSTED!not-for-mail From: "Bj�rge S�ther" <REMOVE_bsaether@THIS_online.no> Newsgroups: comp.lang.pascal.delphi.misc,borland.public.delphi.database,borland.public.delphi.database.desktop,comp.lang.pascal.delphi.databases References: <3a64cc10.6250067@news.uunet.be> Subject: Re: sql in delphi Lines: 55 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Message-ID: <Ap496.7410$wt2.77028@news1.oke.nextra.no> Date: Tue, 16 Jan 2001 23:55:37 +0100 NNTP-Posting-Host: 130.67.107.13 X-Complaints-To: news-abuse@nextra.no X-Trace: news1.oke.nextra.no 979686112 130.67.107.13 (Wed, 17 Jan 2001 00:01:52 MET) NNTP-Posting-Date: Wed, 17 Jan 2001 00:01:52 MET Organization: Nextra Public Access