无法调用SUB过程,大家进来帮下忙
来源:互联网 发布:恋爱纪念日软件 编辑:程序博客网 时间:2024/04/29 08:25
本人想在A页面调用B页面的连接数据库的过程 但是经过测试无法调用成功, 如果不调用SUB那么可以成功链接数据库 请问怎么解决 谢谢
不成功的情况
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
A页面
<!--#include file="conn.asp"-->
<%
call ConnectionDatabase
%>
B页面
<%
public Sub ConnectionDatabase
dim conn
Set conn = Server.CreateObject("ADODB.Connection")
response.Write Server.MapPath("client.mdb")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("client.mdb")
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "The Sever Is Busy,Please try again..."
Response.End
End If
End Sub
%>;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
成功的情况
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
A页面
<!--#include file="conn.asp"-->
<%
'call ConnectionDatabase
%>
B页面
<%
'public Sub ConnectionDatabase
dim conn
Set conn = Server.CreateObject("ADODB.Connection")
response.Write Server.MapPath("client.mdb")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("client.mdb")
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "The Sever Is Busy,Please try again..."
Response.End
End If
'End Sub
%>;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
不成功的情况
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
A页面
<!--#include file="conn.asp"-->
<%
call ConnectionDatabase
%>
B页面
<%
public Sub ConnectionDatabase
dim conn
Set conn = Server.CreateObject("ADODB.Connection")
response.Write Server.MapPath("client.mdb")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("client.mdb")
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "The Sever Is Busy,Please try again..."
Response.End
End If
End Sub
%>;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
成功的情况
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
A页面
<!--#include file="conn.asp"-->
<%
'call ConnectionDatabase
%>
B页面
<%
'public Sub ConnectionDatabase
dim conn
Set conn = Server.CreateObject("ADODB.Connection")
response.Write Server.MapPath("client.mdb")
conn.open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&Server.MapPath("client.mdb")
If Err Then
err.Clear
Set Conn = Nothing
Response.Write "The Sever Is Busy,Please try again..."
Response.End
End If
'End Sub
%>;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
0 0
- 无法调用SUB过程,大家进来帮下忙
- vbscript sub,function过程调用的方法
- 大家进来弹钢琴啦!~
- 大家进来看看。。。。经典
- SUB过程带参数
- sub/function:VBScript 过程
- 编写sub过程
- 你还记得吗-VB中Sub子过程与函数的调用
- 大家进来看看,这是什么错?
- CSDN 的朋友们大家进来看看
- 刚进来,欢迎大家多多指教!
- 大家一起分享C#调用oracle存储过程
- ASP之SUB过程应用
- VB.net Sub Main() 过程
- 【按键精灵】sub子程序、调用子程序
- ExecuteReader调用存储过程无法获取RETURN_VALUE
- c# .net 调用SQL SERVER存储过程 形参 "@**" 未声明为 OUTPUT 参数,但传递进来的实参请求输出。
- 进来
- 探讨Widnows Mobile 程序安装在C盘可以播放GIF动画,安装到T卡上就不能播放动画,是何原因?
- cxf 异常: No namespace on "html" element. You must send a SOAP request
- 接分接分jmail问题
- 您的主机中的软件中止了一个已建立的连接。。。。。。
- 开发moto v600遇到的问题。(50分求答案)
- 无法调用SUB过程,大家进来帮下忙
- 求一个宠物店管理系统
- 手机拨号盘的智能搜索
- 关于全国性计算机考试
- 关于Maximum MIDlet suite size,Heap size,MIDlet storage available疑问
- 对称加密与公钥加密(中)
- 如何选择CMWAP或CMNET进行拨号
- 学习java接口,关于接口功能的原理
- 急求帮助