Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 4 of 4 total |
insert variable value into a table |
Fri, Dec 25 2009 11:55 AM | Permanent Link |
Paul Waegemans | I want to insert an variable value (totaaluitgaven) into a table:
. . totaaluitgaven:=TblAbc.Totaal.value; sql.Add('INSERT INTO rapport values('' '','' '',totaaluitgaven) ') see errormessage in attachment Thanks. Attachments: foutmelding.jpg |
Fri, Dec 25 2009 5:14 PM | Permanent Link |
Steve Forbes Team Elevate | Hi Paul,
Assuming that the column in the table you are inserting into is called "totaaluitgaven", the column type is Double, the table is called "Waegemans", and that there are no (other) required columns you could use the following SQL statement: INSERT INTO Waegemans (totaaluitgaven) VALUES (:value); The :value placeholder is a parameter which can be substituted with a value when the SQL statement is executed i.e. with Query do begin SQL := 'INSERT INTO Waegemans (totaaluitgaven) VALUES (:value);' ParamByName('value').AsFloat := 10.15; ExecSQL; end; Hope this helps Best regards Steve Paul Waegemans wrote: > I want to insert an variable value (totaaluitgaven) into a table: > > . |
Sun, Dec 27 2009 4:29 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Paul
>I want to insert an variable value (totaaluitgaven) into a table: On the minimal information given I assume you mean using SQL so INSERT INTO tablename (fieldname) VALUES(:Value) and supply Value as a parameter to the query If that's not what you want please let us have some more details Roy Lambert [Team Elevate] |
Sun, Dec 27 2009 4:28 PM | Permanent Link |
Paul Waegemans | tHIS IS PERFECT!
Steve Forbes wrote: Hi Paul, Assuming that the column in the table you are inserting into is called "totaaluitgaven", the column type is Double, the table is called "Waegemans", and that there are no (other) required columns you could use the following SQL statement: INSERT INTO Waegemans (totaaluitgaven) VALUES (:value); The :value placeholder is a parameter which can be substituted with a value when the SQL statement is executed i.e. with Query do begin SQL := 'INSERT INTO Waegemans (totaaluitgaven) VALUES (:value);' ParamByName('value').AsFloat := 10.15; ExecSQL; end; Hope this helps Best regards Steve Paul Waegemans wrote: > I want to insert an variable value (totaaluitgaven) into a table: > > . |
This web page was last updated on Tuesday, April 30, 2024 at 03:55 PM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |