-
If the parent class and word class are in the same table: Change the delete method as follows:
public void delete(int cate_id)stringbuilder strsql=new stringbuilder();
delete from gcategory ");This is the added part.
where parent_id=@cate_id ");This is the added part. It means a line break.
delete from gcategory ");
where cate_id=@cate_id ");
sqlparameter parameters = ;
parameters[0].value = cate_id;
parameters);
-
Then click Delete Subclass.
-
constraint fk_father foreign key (fid) references yourtablename(id) on delete cascade
If a record is deleted in this way, then all foreign keys connected to the record will be deleted in cascade (including the descendants of the descendants).
-
For example, Table A is the parent table and has the following fields: id (primary key) and name.
Table B is a sub-table with the following fields: id (primary key) and name.
Set the primary key of Table A to the foreign key of Table B.
-
No special statement is required, just set the table attribute to cascade deletion.
-
A new class of an object is derived from an existing class, a process called inheritance.
Child classes can inherit except for the private property in the parent class.
If you don't need the properties of the parent class, you can override the original attributes.
Similar to universality and particularity.
For example, if there are people on the earth, people are divided into three types: yellow, black, and white, and at this time, all three of them inherit the basic attributes of human beings and have their own unique skin color attributes, and so on. Some people abandon their original peaceful attributes, encroach on other people's territories, enslave other peoples, and reverse other people's history, and then we call them "devils".
-
Judging from the ** you posted,There should be no need to delete.,People、Animal are stateless functions.,There is no overwriting or modification.。
-
That is to say, you have to delete the assigned value after assigning the value, otherwise if the method in the subclass has the same name as it, the value in the subclass will be automatically assigned to your parent class, the description is not very clear, is there a fuction father() {you didn't write it?}
-
I often delete similar files you said with a batch process, del f a q 1
rd /s /q \\1
Save the file with the bat suffix, and then pull the file that cannot be deleted onto the batch file.
This file states: "It is a vulnerability in Microsoft's system, and many security software and Trojans exploit it to create files that can penetrate and restore it." There are people in the Internet café who use this file to save their own private files, and I used to see some experts doing this often when I used to do Internet café maintenance.
To illustrate:This trick XP works,Win7 has blocked this vulnerability,Even this trick is ineffective
-
Hello, first of all, you make sure that your i drive exists or not, and the second is to see if you have the permission to open it.
-
delete from product where id = parent id or big id = parent id
The premise is that the big ID of your secondary category is associated with the ID of the parent class.
It's probably because when you install some software, there is a Google prompt that it is installed by default, and you didn't cancel it, so you installed Google's plugin. This plugin is maliciously attacked. >>>More
Generally, there are several reasons why files cannot be deleted normally, and there are corresponding deletion methods for different situations: >>>More
It's very common to delete by mistake. If you delete the important things, then I won't talk about them. >>>More
Windows XP is a simple way to install in different partitions with Windows Vista. >>>More
1.As an administrator, log in to the Control Panel - User Accounts - select Remove Password. >>>More