[技术散分]ASP调用VB编写的组件
在VB按MVC的构架写组件供ASP调用
BLL层
VB code:
Private Dal As New moonPotato_DAL
Public Sub inSertUser(Model As moonPotato_Model)
Dal.InSertCls (Model)
End Sub
ASP中调用
VB code:
Set BLL = server.CreatoObject("tttt.moonPotato_BLL")
Set Model= server.CreatoObject("tttt.moonPotato_Model")
Model.userName="123"
Model.userLevel="456"
BLL.inSertUser(Model)
这样就提对象不支持该属性或方法,问题指向Dal.InSertCls (Model),在ASP中单独运行Dal.InSertCls没有问题
如果把以上BLL部分直接写在ASP中就正可正常执行,这是什么原恩
问题是Dal.InSertCls (Model)改成这样就Dal.InSertCls Model OK
看来()能不用就不用。VB的语法确实不太规范,中午结贴。
如需要阅读该回复,请登录或注册CSDN!
相关问答:
<%@language="vbscript"%>
<%option explicit%>
<html>
<head> <title>xxx </title> </head>
<script language=vbs>
'注意变量 ......
<form id="form1" runat="server">
<div>
<script type="text/javascript">
function oo(a){
document.getEleme ......
HTML code:
dim jf
set conn=server.createobject("adodb.connection")
connstr="Driver={Sql Server};Server="&Sqlip&";Database="&Sqldb&";Uid="& ......
最近我通过学习,感觉自己学的还可以了,想做一网站,但是一直都找不到题材,不知道做什么,希望各位给我点意见,如果有需求文档就更好了!希望大家给我点意见,谢谢!
先做个企业网站吧,我感觉一个人做网站不适宜 ......
我用VB按MVC的构架写组件供ASP调用
BLL层
VB code:
Private Dal As New moonPotato_DAL
Public Sub inSertUser(Model As moonPotato_Model)
Dal.InSertCls (Model)
End Sub
ASP中调用
VB c ......