![]() |
Re: Update Database via SQL
It's the same for SQL as without. Just leave the key field unset:
SQL-Code:
insert into <Tablename> (FirstName) values ( :firstname);
|
Re: Update Database via SQL
I am not familiar with Absolute Database, so I cannot say if an autoinc-key can start with 0 there, but you can use this key as condition in the above example:
SQL-Code:
UPDATE <tablename> SET FirstName = 'John', LastName = 'HeyHo', Sallary = 20100 WHERE EmployeeID = 1
|
Re: Update Database via SQL
You mean like this right,
Delphi-Quellcode:
ABSQuery1.SQL.Clear;
ABSQuery1.SQL.Add('UPDATE <tablename> SET FirstName = 'John', LastName = 'HeyHo', Sallary = 20100 WHERE EmployeeID = 1'); ABSQuery1.SQL.Open; |
Re: Update Database via SQL
This updates Lisa with John.
|
Re: Update Database via SQL
I ment the string it has to be like this,
Delphi-Quellcode:
Otherwise not compile?
ABSQuery1.SQL.Add('UPDATE <tablename> SET FirstName = John, LastName = HeyHo, Sallary = 20100 WHERE EmployeeID = 1');
|
Re: Update Database via SQL
Use parameters.
|
Re: Update Database via SQL
Thanks i will.
You all probably asked why does he need this. Well to tell you the truth i need it becouse i have to load DB items to listview.Becouse there isn't a DB listview that also supports groups. |
Re: Update Database via SQL
It compiles even with wrong statements. At runtime an error is then reported
|
Re: Update Database via SQL
Is this good idea for creating&updating items from DB to non data aware listview
|
Re: Update Database via SQL
I ment for creating and updating DB efficiently.Anyways this is my full code.If someone can peak to it and look if something could be improved.Mainly the procedure CreateUpdateSensors
![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 12:12 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz