Article View: borland.public.interbase.sql
Article #296Re: double quotes in value clauses
From: chrisgi
Date: Tue, 26 Feb 2008 14:28
Date: Tue, 26 Feb 2008 14:28
43 lines
2779 bytes
2779 bytes
can you explain what that is
i am building up a query in the code manually and ftp to a server where it is run thru isql
how do i do i
sample here
filename := 'c:\dsmout\DSMADD-'+ controlcontrol_dsm.text + account_number.Text + formatdatetime('yyyy-mm-dd-hh.ss',now()) + '.sql';
s:= tstringlist.create;
try
s.add ('CONNECT /data/dsmdata/interbase/amends/AMENDS.GDB user "SYSDBA" password "masterkey";');
s.add ('DELETE FROM customers where cust_number = ' +'"' + account_number.text + '";');
s.add ('INSERT INTO customers(cust_number,cust_dsm,cust_date,cust_status,');
s.add ('cust_cfname,cust_cad1,cust_cad2,cust_cad3,cust_cad4,cust_cadpc,');
s.add ('cust_mobile,cust_contact,cust_phone,cust_fax)');
s.add (' VALUES ("' + account_number.Text + '","'
+ controlcontrol_dsm.Text + '","'
+ sqldate + '","O","'
+ account_name.Text + '","'
+ acc_address1.text + '","'
+ acc_address2.text + '","'
+ acc_address3.text + '","'
+ acc_address4.text + '","'
+ acc_postcode.Text + '","'
+ acc_sec_mobile.text + '","'
"Craig Stuntz [TeamB]" <craig_stuntz@nospam.please [a.k.a. acm.org]> wrote:
> The easiest solution is to use a parameterized query. This *always*
>works.
>
>--
>Craig Stuntz [TeamB] � Vertex Systems Corp. � Columbus, OH
> Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
>Please read and follow Borland's rules for the user of their
> server: http://support.borland.com/entry.jspa?externalID=293
Technical Details
Message-ID:
<47c43028$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<47c424be$1@newsgroups.borland.com> <47c42b1c$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,5ae3542750123753 X-Google-Attributes: gid114a0e,public,usenet X-Google-Language: ENGLISH,ASCII From: "chrisgi" <chrisgi@omex.com> Sender: "chrisgi" <chrisgi@omex.com> Reply-To: "chrisgi" <chrisgi@omex.com> Subject: Re: double quotes in value clauses Newsgroups: borland.public.interbase.sql X-User-Info: 217.36.99.42 References: <47c424be$1@newsgroups.borland.com> <47c42b1c$1@newsgroups.borland.com> NNTP-Posting-Host: 207.105.83.66 Message-ID: <47c43028$1@newsgroups.borland.com> Date: 26 Feb 2008 07:28:40 -0700 X-Trace: newsgroups.borland.com 1204039720 207.105.83.66 (26 Feb 2008 07:28:40 -0700) Lines: 44 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail