TSQLQuery/ja
English · Français · Русский · 日本語
TSQLQuery
はサポートされるデータベースのいずれに対しても、用いられる基本的なデータベースクエリコンポーネントである。このコンポーネントはComponent PaletteのSQLdb tabにある。
TSQLQueryの典型的な用い方:
SQLTransaction1.Database := SQLConnection1;
SQLQuery1.Transaction := SQLTransaction1;
DataSource1.DataSet := SQLQuery1;
DBGrid1.DataSource := DataSource1;取得(Select)
あるリストからすべてのカラムを取得する:
SQLQuery1.SQL.Text := 'SELECT * FROM somelist';
SQLQuery1.Open();挿入(Insert)
あるテーブルに新しいレコードを挿入する:
SQLQuery1.SQL.Text := 'INSERT INTO somelist (ItemNr,ItemCount) VALUES (1231,2)';
SQLQuery1.ExecSQL();
SQLTransaction1.Commit();以下も参照のこと
From the Free Pascal wiki, page "TSQLQuery/ja", as it stood on 2024-03-26 after a change by Ariben, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.