List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:December 1 2005 2:41pm
Subject:Re: Assigment sign not work on Delphi
View as plain text  

> Which component, Spider?
> with TSQLQuery try setting: ParamCheck property to false. Look in help
> for your specific component...

Mind you, setting ParamCheck only has effect for run-time assignments
to the SQL strings property.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com

> To Leo's :
> Delphi/dbExpress uses ':' character to specify SQL Parameters much alike
> mysql uses '@' for variables :)
> e.g.:
> q.sql := 'select * from tbl where col1=:val1';
> // then you can
> // if ParamCheck := True of course - which it *is* by default to do:
> q.Params[0] := 'somevalue'; //or even e.g.:
> q.Params.ParamByName('val1').AsInteger := 999;
>
> more thorough example is in help:
> Query2.SQL.Clear;
>
> Query2.SQL.Add('INSERT INTO COUNTRY (NAME, CAPITAL, POPULATION)');
> Query2.SQL.Add('VALUES (:Name, :Capital, :Population)');
>
> Query2.Params[0].AsString := 'Liechtenstein';
> Query2.Params[1].AsString := 'Vaduz';
> Query2.Params[2].AsInteger := 420000;
> Query2.ExecSQL;
>
> The Nice Spider wrote:
> > Using Delphi to with this query:  SELECT TOTAL :=
> > PRICE * QTY FROM
> > INV_PRODUCT
> >
> > will caused error "Parameter object is improperly
> > defined. Inconsistent or
> > incomplete information was provided." because Delphi
> > look it as Parameter (a
> > parameter of query in Delphi using ":" at the
> > beginning).
> >
> > Is it better for MySQL using "=" rather than ":=" ? Or
> > is there any setting
> > to set MySQL to accept the "=" sign?
> >
> >
> >
> >
> > __________________________________
> > Yahoo! FareChase: Search multiple travel sites in one click.
> > http://farechase.yahoo.com
>
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1

Thread
Assigment sign not work on DelphiThe Nice Spider18 Nov
  • Re: Assigment sign not work on DelphiLeo21 Nov
  • Re: Assigment sign not work on DelphiRemo Tex1 Dec
  • Re: Assigment sign not work on DelphiMartijn Tonies1 Dec