缺少数据库连接不会返回错误 [英] Lack of DB connection doesn't return an error

查看:50
本文介绍了缺少数据库连接不会返回错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我好b

我明白为什么下面的代码不能工作,objRS使用的objDCMenu连接已经已关闭。



我想知道的是为什么我没有收到页面错误。页面挂起,服务器尝试解析以一种扼杀CPU的循环结束的指令。



任何想法都将受到赞赏。



非常感谢

Hello everyone

I understand why the code below doesn't work, the objDCMenu connection that objRS uses has already been closed.

What I'd like to know is why I don't get a page error. The page hangs and the server attempts to parse the instruction ending up in a kind of loop that chews up the CPU.

Any ideas would be appreciated.

Many thanks

 

'关闭数据库连接    

objDCMenu.close



'声明记录集

设置objRS =服务器.CreateObject(" ADODB.Recordset")

'开放记录集

objRS.Open" SELECT conversionID,conversionLabel,conversionLang,campaignName FROM tblGoogleConversion WHERE domain =" &安培; intCountryID& " AND conversionPageType = 1" ,
objDCMenu ,0,1

'Close the database connection   
objDCMenu.close

'Declare record set
Set objRS = Server.CreateObject("ADODB.Recordset")
'Open record set
objRS.Open "SELECT conversionID, conversionLabel, conversionLang,campaignName FROM tblGoogleConversion WHERE domain=" & intCountryID & " AND conversionPageType=1" , objDCMenu, 0, 1

推荐答案

Hi BoomFelled。

Hi BoomFelled.

你使用的是什么程序语言,它可以是VB6,VBS和VBA,但肯定不是这个论坛的Visual Basic for Net。

What program language are you using, it can be VB6, VBS and VBA but for sure not Visual Basic for Net for which this forum is.

抱歉,

 


这篇关于缺少数据库连接不会返回错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆