In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "what are Ado Connection skills". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what are Ado Connection skills".
First of all, we know that activex dll is a class library, the most typical is ado msxml, etc. These class libraries are relatively single libraries as part of the program process that Ado Connection is loaded in the main program when the main exe is running. It is called in-process component.
But activex exe is different. It creates a new process main program to call the interface when the component is called, and then the data is processed by an out-of-process service process and sent back. Ado Connection so this approach is called out-of-process components, also known as ole automation servers.
This is a common way for very powerful programs, such as word excel, etc. We may only need our process to have a small part of their functions to open a small number of interface references, but in the reference process outside the main process, the whole office may be working together. Your problem now is that you try to pass an Ado Connection between processes, which is a sensitive object with a connection state, which is very dangerous and expensive and forbidden to pass between activex exe processes.
But there is absolutely no problem when activex dll delivery is in the same process. So it is recommended to pass the value type of CONNECTION STRING instead of a stateful object or to make the common logical parts of the main program and activex exe into a common activex dll for two projects to drink it respectively.
If the use of calling ADO.NET is necessary, what if the program structure prevents me from wrapping my Ado Connection with using () {}, for example, my Connection is returned by the same help class?
This is a common problem. In such an environment, we can't wrap the entire connection in one connection. There are two ways to solve this problem. One is to modify your code structure. Pass in a ConnectionString to return the call ADO Connection. Another way is to double-check your code to see if Connection is closed in time.
Because the effect of Close is the same as dispose. But if we don't use using () {}, the task of shutting down Connection in time is in our own hands, instead of being guarded by. Net framework.
Thank you for your reading, the above is the content of "what are Ado Connection skills", after the study of this article, I believe you have a deeper understanding of what Ado Connection skills are, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
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.