In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the method of ADO operation example analysis", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next let the editor to take you to learn the "ADO operation method example analysis" bar!
You need to pay attention to the relevant problems when doing ADO operations, and you can use another method. A lengthy discussion on the vbdata-l@peach.ease.lsoft.com list service led to what I call Prebinding.
This technique doesn't help when you only need to reference the Field object once; but in client / server applications, the pre-binding approach is ideal. When using this method, you create multiple independent, named Field objects and set them as members of the Recordset object Fields collection. When writing code, you first create a named Field object for each field you want to use, for example:
When writing code, you must also consider other factors that affect performance. Some of these factors have nothing to do with ADO-they have to do with COM. A recent white paper by Microsoft pointed out that performing ADO operations (joins, queries, processing) in Windows 2000 ASP pages is faster than calling COM components to execute the same code.
This conclusion is not surprising: when we call an external COM component (some code outside the current process) from VB, accessing the COM component and passing control to the ADO operation is surprisingly complex and slow in the background. Although there is no need to avoid calling COM components to run ADO code.
However, we should not simply encapsulate multiple independent ADO operations into a large number of small COM components and then call them every time we need them. Instead, ADO operations we should try to encapsulate all the logic into a COM component, so that with only one call, COM can do most (if not all) of the operations.
I believe you have found that running ADO code in binary form (such as COM components) is faster than running interpretations such as ASP. Therefore, you should look for ways to reduce the expensive cost of entering and returning from COM components.
If you can't do without Command objects, or if you can't pre-bind Field objects and reuse them if necessary, then you should consider techniques to avoid redundant object creation operations. In this case, it is more important for ADO operations to use stored procedures as method calls to Connection objects. In addition, referencing the Field property in a pre-bound manner can also help improve performance. Remember the cleanup that must be done after the operation is complete: close the Connection and Recordset objects and set them to Nothing.
In order for both code and code writers to show performance, keep in mind the following basic rules: use connection pooling and asynchronous connections; reduce the number of times ADO code communicates with the database server; choose a COM- advance binding technique; and avoid expensive ADO operations, such as Recordset and Command objects, unless necessary
If possible, replace the recordset with the Return Status and Output parameters. Make queries as efficient as possible, and if possible, don't forget to take advantage of stored procedures for ADO operations. Tell ADO exactly what you want it to do and avoid letting ADO guess your intentions-explicitly specify ADO CommandType, use options such as adExecuteNoRecords.
At this point, I believe that you have a deeper understanding of "ADO operation method example analysis", might as well come to the actual operation of it! Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.