TADOConnection.Close - connection still active on MS-SQL server
I have several Delphi programs (XE3), that use a TADOConnection to connect to a MS-SQL Server. I recently checked the connections in the "MS SQL Server Management Studio"'s process list.
- When the program starts, the connection is inactive, no connection in the server's process list.
- When I open the connection it's shown in the process list - as expected.
- When I close the connection (definitely the property "Connected" returns FALSE), the connection is still shown on the servers process list.
On the server the Connection is not closed until I close the program.
Is there a way to close the TADOConnection in a way that really removes the connection on the server without exiting the program?
This is connection pooling; and is a good thing.
But if you really want to hurt performance, you can opt-out of connection pooling features by adding the request to your connection string:
Provider=SQLOLEDB;Data Source=myServerAddress;Initial Catalog=myDataBase;
User ID=myUsername;Password=correct horse battery stapler;OLE DB Services=-2;
These OLE DB Services options are documented on MSDN:
Pooling in the Microsoft Data Access Components (archive)
OLE DB Services Services enabled
=============== ==================================================
-1 All services (the default)
-2 All services except pooling
-4 All services except pooling and auto-enlistment
-5 All services except client cursor
-6 All services except client cursor and pooling
0 No services
来源:https://stackoverflow.com/questions/48705373/tadoconnection-close-connection-still-active-on-ms-sql-server
TADOConnection.Close - connection still active on MS-SQL server的更多相关文章
- (火炬)MS SQL Server数据库案例教程
(火炬)MS SQL Server数据库案例教程 创建数据库: CREATE DATABASE TDB //数据库名称 ON ( NAME=TDB_dat,//逻辑文件名 在创建数据库完成之后语句中引 ...
- Set up JBPM5.4 Final Installer to use MS SQL Server 2008 using JTDS(转)
[-] A What I Am Going To Do B The Setup Steps C Lets Install it A. What I Am Going To Do B. The Se ...
- java连接ms sql server各类问题解析
首先先来说下使用微软自己开发的架包进行ms sql server数据库的连接时,sql 2000与sql 2005的连接方式略有不同: 1.首先驱动不一样,sql 2000的连接驱动包有三个,分别是: ...
- MS SQL Server 数据库连接字符串详解
MS SQL Server 数据库连接字符串详解 原地址:http://blog.csdn.net/jhhja/article/details/6096565 问题 : 超时时间已到.在从池中获取连接 ...
- Datagrip连接SQLServer Connecting DataGrip to MS SQL Server
Connecting DataGrip to MS SQL Server Posted on June 21, 2016 by Maksim Sobolevskiy Some specific nee ...
- Server-side Query interception with MS SQL Server
up vote15down votefavorite 5 I'm researching into intercepting queries that arrive at the SQL Serv ...
- [MS SQL Server]SQL Server如何开启远程访问
在日常工作中,经常需要连接到远程的MS SQL Server数据库中.当然也经常会出现下面的连接错误. 解决方法: 1. 设置数据库允许远程连接,数据库实例名-->右键--->属性---C ...
- Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码)
Linux下使用FreeTDS访问MS SQL Server 2005数据库(包含C测试源码) http://blog.csdn.net/helonsy/article/details/7207497 ...
- MS SQL Server中数据表、视图、函数/方法、存储过程是否存在判断及创建
前言 在操作数据库的时候经常会用到判断数据表.视图.函数/方法.存储过程是否存在,若存在,则需要删除后再重新创建.以下是MS SQL Server中的示例代码. 数据表(Table) 创建数据表的时候 ...
随机推荐
- 03、 forms组件
1.校验字段功能 1.reg页面准备 models from django.db import models class UserInfo(models.Model): useranme = mode ...
- codechef FEB19 Manhattan Rectangle
Manhattan Rectangle 链接 题意: 交互题,询问小于7次,确定一个矩形的位置,每次询问一个点到矩形的曼哈顿距离. 分析: 询问三个顶点,然后解一下方程,求出一个边界,就好办了. 用s ...
- AGC 007 D - Shik and Game
D - Shik and Game 链接 题意: 数轴上有一个人,从0出发到E,速度为1.数轴上还有n只熊,每只熊会在经过后的T时刻后产生一个金币.给定E,T以及n个熊的坐标pi,求收集完所有金币并到 ...
- Python_sklearn机器学习库学习笔记(六) dimensionality-reduction-with-pca
# 用PCA降维 #计算协方差矩阵 import numpy as np X=[[2,0,-1.4], [2.2,0.2,-1.5], [2.4,0.1,-1], [1.9,0,-1.2]] np.c ...
- html元素可以同时实现两个class的功能
html元素标签可以放置两个不同的class文件并分别实现效果
- ASP.NET5之客户端开发:Grunt和Gulp构建工具在Visual Studio 2015中的高效的应用
Grunt和Gulp是Javascript世界里的用来做自动压缩.Typescript编译.代码质量lint工具.css预处理器的构建工具,它帮助开发者处理客户端开发中的一些烦操重复性的工作.Grun ...
- 自制刻度尺插件-前端简易实现"腾讯信用"界面
依据我现有的知识,在前端上"简易"的实现了腾讯信用的界面,同时自己自制了一个竖直的刻度尺插件,曲线的位置可以根据传入的数值动态的改变,这次主要也想总结一下关于jQuery中exte ...
- bootstrap框架中data-toggle="tab"属性会取消a标签默认行为
这几天做公司项目用了bootstrap框架,在用导航组件的过程中,我发现在a标签里面添加data-toggle="tab"属性之后,这个a标签会失去默认行为,点击a标签的时候不会跳 ...
- Android Studio —— java.lang.VerifyError: Verifier rejected class 问题解决
用as开发过程中遇见问题app闪退 log如下图: 解决: File—Settings: 点击Apply—OK重新运行即可
- python接口自动化2-发送post请求
发送post的请求参考例子很简单,实际遇到的情况却是很复杂的,首先第一个post请求肯定是登录了,但登录是最难处理的.登录问题解决了,后面都简单了. 一.查看官方文档 1.学习一个新的模块,其实不用去 ...