设置ADO ConnectionTimeout时间次数

开发 后端
学习ADO ConnectionTimeout时,经常会遇到ADO ConnectionTimeout问题,这里将介绍ADO ConnectionTimeout问题的解决方法。

本文介绍对于ADO ConnectionTimeout 设置为 15 秒。 ADO ConnectionTimeout 属性但是,可能设置为高或较低的值。 能够解析名称的客户端 IP 地址从 OLAP 服务器是否连接成功后几秒钟的时间。

无法解析的 IP 地址从客户端名称在由 ADO ConnectionTimeout 设置允许的时间内 OLAP 服务的服务器是否会发生连接超时错误。 客户端的名称来自 IP 地址的解析则更快、 更快,连接发生。#t#
 
Microsoft和/或其各供应商对于为任何目的而在本服务器上发布的文件及有关图形所含信息的适用性,不作任何声明。 所有该等文件及有关图形均"依样"提供,而不带任何性质的保证。

于适销性、符合特定用途、所有权和非侵权的所有默示保证和条件。在任何情况下,在由于使用或运行本服务器上的信息所引起的或与该等使用或运行有关的诉讼中,Microsoft和/或其各供应商就因丧失使用、数据或利润所导致的任何特别的、间接的、衍生性的损害或任何因使用而丧失所导致的之损害、数据或利润不负任何责任。

运行 Microsoft Internet 信息服务器ADO ConnectionTimeout 创建一个新的 ASP 页,使用此代码来命名 Olaptest.asp:

  1. <%@ Language=VBScript %> 
  2. <HTML> 
  3. <HEAD> 
  4. <META NAME="GENERATOR" Content="OLAP Connection Test"> 
  5. </HEAD> 
  6. <BODY> 
  7.  
  8. <%  
  9. mystarttime=timer 
  10. response.write mystarttime & "<BR>"  
  11. set myconn = server.createobject("ADODB.Connection")  
  12. 'Change the Data Source in the next line to the name of the remote OLAP Server.  
  13. strConnectionOLAP="Provider=MSOLAP;Data Source=Remote_OLAP_Server;Initial Catalog=FoodMart 2000;" 
  14. 'myconn.connectiontimeout=45 
  15. myconn.open strConnectionOLAP  
  16.  
  17. Response.write Request.ServerVariables("REMOTE_HOST") & "<BR>"  
  18. Response.write Request.ServerVariables("REMOTE_USER") & "<BR>"  
  19. response.write Request.ServerVariables("LOGON_USER") & "<BR>"  
  20.  
  21. If Not myconn Is Nothing Then   
  22.    response.write "Connected" & "<BR>"  
  23. Else   
  24.    response.write "Failed to connect" & "<BR>"  
  25. End If   
  26.  
  27. endtime=timer 
  28. response.write endtime & "<BR>"  
  29.  
  30. response.write "Connect Time = " & endtime - mystarttime  
  31. myconn.close  
  32. SET myconn=nothing 
  33. %>    
  34.  
  35. </BODY> 
  36. </HTML> 
责任编辑:chenqingxiang 来源: 博客园
相关推荐

2023-09-01 08:18:53

Tomcat配置参数

2009-12-25 14:23:35

ADO.NET设置

2009-12-30 15:11:35

ADO.NET数据

2023-10-11 08:16:42

客户端服务器内容

2009-12-30 14:21:21

ADO.NET设置

2009-12-30 15:50:18

ADO.NET Dat

2009-12-30 09:46:02

ADO.NET操作

2009-11-03 16:37:10

2009-12-29 16:12:25

ADO程序员

2009-12-31 16:09:22

ADO与ADO.NET

2009-11-11 13:59:15

ADO.NET与ADO

2009-12-31 13:41:39

ADO.NET架构

2009-12-18 16:44:57

ADO.NET统计

2009-12-28 15:11:36

ADO.NET专家

2011-05-20 11:31:07

ADO.NET

2009-08-19 09:36:03

ADO封装类

2009-12-29 11:15:45

ADO数据库

2009-12-28 13:23:38

ADO Records

2009-12-24 17:37:26

ADO分页

2009-09-14 13:37:25

LINQ ADO.NE
点赞
收藏

51CTO技术栈公众号