The value of a query condition comes from another query.
Like SQL Server sql:
SELECT * from the products where categoryid= (select top 1 CategoryID from categories where categoryname= ' produce ')
The implementation code for this SQL is as
The previous section describes the delete operation, and this section describes how to execute the SQL statement directly.
Executing SQL statements directly is using the Fromsql method.
DBSESSION.DEFAULT.FROMSQL ("SELECT * FROM Products").
This section describes the use of the update Operation,update when the add operation is completed in the previous section.
First example:
//获取Products表第一行 Products p = DbSession.Default.From().ToFirst(); //开启修改 (修改操作之前 必须执行此方法) p.Attach();
Hxj.data uses the portal to encapsulate commonly used operations in the Hxj.data.dbsession,dbsession class, such as: from,insert,update,delete and other common methods.
Dbsession.default is a default dbsession. The last configuration of the
The difference between INNODB foreign key and SQL standards:
When there are many rows in the SEL statement inserts,deletes,updates, the FK is checked one line at a time. InnoDB
is to set the shared Row_level locks on the parent or child table,
Basic knowledge
Classification of database logs
1. Binary Log
2. Error log
3. General Query Log
4. Relay Log
5. Slow query log
Format of binary logs:
Statement: Based on statement
Row: Line based
Mixed: Blending mode
MySQL Isolation level:
1. Use Zabbix+shell script to monitor MySQL master-slave replication, when the exception from the library when the alarm.
1.1 First to the MySQL slave authorized a monitoring account.
1.2 Write a monitor from the database state of the script,
First, the introduction
VC in the development of the database on the project, usually we have to use Microsoft's DBGrid as a database table control, in fact, Microsoft's DBGrid is not easy to find a good help documents are not found, and the
First, create a new dialog box based program
Delete static will be changed to color.
Third, add the following message map with Class wizard in the DLG header file
afx_msg void OnExitButton(); afx_msg void OnDestroy(); afx_msg void OnTimer(UINT
The Operation effect chart is as follows:
Want to do a tracking debugging tools, so to find similar to the Internet VC can set breakpoints EditView, unfortunately did not find (oh, I am not good e-wen, did not go to foreign sites to find). Then
When you set up an SDI or MDI program, if you choose Richeditview, you can take advantage of the rich format provided by RichEdit, but it is a problem to write text in Richeditview by program. The following is a description of how to implement a
First, the introduction
With MSN and QQ chat, when the user input a specific meaning of the string, the system back automatically with a small picture replacement. For example, enter the ":" System
will be replaced with a small smiley face. I want
When there are quite a few controls in a dialog based program, you will think of using property pages to classify the controls. This paper discusses several possible scenarios for this approach.
Programme I
For examples of this scenario, see the
The recent development of a software encountered the problem of property editing, would like to use a list control to replace, but found that the list control has a lot of flaws, not too useful. The property control does not support editing and Drop-
A few days ago due to the need for programming. To do a static control with a border, so in the trace of other people do the basis of 3DBar, oneself made a C3dbar class, now dedicate it to everyone. Here's how to use C3dbar.
The use of this class
Read the VC Knowledge Base, "online Magazine," the 27th phase of "electronic eight-segment simulation", really good, but serious distortion. Know our knowledge base so long, learned a lot of things, I should also make a point of "contribution", so I
tree controls are used to display data items with a certain level of structure is convenient, intuitive, widely used in various software, such as the disk directory in the resource manager with the tree control, we will often use in programming, but
The sample code runs as shown below:
In many cases, we often need to implement a tree's polymorphic selection, as shown in the figure above, when all child nodes are selected, the current node is selected (such as the diagram [Jingmen] node) and
After clicking on a node in the tree, the set of child nodes of the current node is displayed using the method of starting the database, which causes the complexity of the data processing and the slow speed of the program. After my repeated
I have collected some of the online and shut down the code, found that the shutdown code is almost the same, and the effect of the shutdown before the code of several subjects did not, only a WIN2000, its methods such as: To create a brush, with a
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service