Arsip: tolongi donk !!!

 
user image
more 13 years ago

sapta

gimana caranya untuk update data ke access yang data yang sudah di edit, menggunakan ADO perintah AQL. ??? pliss bantui donk para Master.
user image
more 13 years ago

Soni


UPDATE tbl_name
    SET col_name1=expr1 [, col_name2=expr2 ...]
    [WHERE where_condition]
user image
more 13 years ago

Kecret

maksudnya ? tolong lebih jelas mas?
user image
more 13 years ago

sapta

heheheheh jadi malu !!makasih mas !! sekarang menghapus datanya saya pening... nih mas, pakai perintah delete SQL enggak bisa. misal kode barang (primary key) dari data barang relasi dengan table barang keluar? terus mau dihapus kok enggak bisa? apa kerena ada (primary key) ya ???
user image
more 13 years ago

deLogic

jika tabel tersebut mempunyai relasi / constraint dengan tabel lainnya berarti ya data yang ditabel relasi tersebut harus di hapus terlebih dahulu.. Sebetulnya penghapusan bisa 'lebih' di otomatisjika Anda menerapkan Cascading Action saat Delete atau Update record.
user image
more 13 years ago

sapta

"" Sebetulnya penghapusan bisa 'lebih' di otomatisjika Anda menerapkan Cascading Action saat Delete atau Update record."" >> maksudnya gimana mas. kasih contoh dong !! biar mudah di pahami.
user image
more 13 years ago

zieborg

cascading delete/update itu settingnya di databasenya, pas bikin relasi kalo mau delete deletenya dari delphi, delete dulu detailnya(tbl barang keluar), baru tabel barangya bisa dihapus
user image
more 13 years ago

deLogic

{$SET_COPY_PASTE 1} Cascading referential integrity constraints allow you to define the actions Microsoft® SQL Server™ 2000 takes when a user attempts to delete or update a key to which existing foreign keys point. The REFERENCES clauses of the CREATE TABLE and ALTER TABLE statements support ON DELETE and ON UPDATE clauses: [ON DELETE { CASCADE | NO ACTION }] [ON UPDATE { CASCADE | NO ACTION }] NO ACTION is the default if ON DELETE or ON UPDATE is not specified. NO ACTION specifies the same behavior that occurs in earlier versions of SQL Server. ON DELETE NO ACTION Specifies that if an attempt is made to delete a row with a key referenced by foreign keys in existing rows in other tables, an error is raised and the DELETE is rolled back. ON UPDATE NO ACTION Specifies that if an attempt is made to update a key value in a row whose key is referenced by foreign keys in existing rows in other tables, an error is raised and the UPDATE is rolled back. CASCADE allows deletions or updates of key values to cascade through the tables defined to have foreign key relationships that can be traced back to the table on which the modification is performed. CASCADE cannot be specified for any foreign keys or primary keys that have a timestamp column. ON DELETE CASCADE Specifies that if an attempt is made to delete a row with a key referenced by foreign keys in existing rows in other tables, all rows containing those foreign keys are also deleted. If cascading referential actions have also been defined on the target tables, the specified cascading actions are also taken for the rows deleted from those tables. ON UPDATE CASCADE Specifies that if an attempt is made to update a key value in a row, where the key value is referenced by foreign keys in existing rows in other tables, all of the foreign key values are also updated to the new value specified for the key. If cascading referential actions have also been defined on the target tables, the specified cascading actions are also taken for the key values updated in those tables. Examples of cascading referential actions can be based on the FK_Products_Suppliers constraint on the Products table in Northwind. This constraint establishes a foreign key relationship from the SupplierID column in the Products table to the SupplierID primary key column in the Suppliers table. If ON DELETE CASCADE is specified for the constraint, deleting the row in Suppliers where SupplierID equals 1 also deletes the three rows in Products where SupplierID equals 1. If ON UPDATE CASCADE is specified for the constraint, updating the SupplierID value in the Suppliers table from 1 through 55 also updates the SupplierID values in the three rows in Products whose SupplierID values currently equal 1. Taken from MSSQL Online Help.
more ...
  • Pages:
  • 1
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com