ASP 3.0声明ADO常量瓦特/出含ADOVBS.INC [英] ASP 3.0 Declare ADO Constants w/out Including ADOVBS.inc

查看:156
本文介绍了ASP 3.0声明ADO常量瓦特/出含ADOVBS.INC的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经写了使用ASP3.0 / VBScript中一个简单的表格处理程序脚本,想(通过网络)来添加输入数据到位于我的服务器上的Access数据库。我使用的OLEDB方法连接,像这样:

I've written a simple form handler script using ASP3.0/VBScript and would like to add the inputted data (via the web) to an Access database located on my server. I'm using the OLEDB method to connect like so:

Cst = "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"DATA SOURCE=" & Server.MapPath("DataBase.mdb")

Dim Conn
Set Conn = CreateObject("ADODB.Connection")
Conn.Mode = 3

Conn.Open Cst

Blah Blah Blah...

我现在有一个名为ADOVBS.INC文件包括在顶部,但想抛弃它,因为我觉得它的低效和浪费。我想因为我需要他们 - 但我不知道如何定义的常量。我需要什么ADO常量定义在哪里?我使用基本上说这本书忘掉纳─磅包括400家左右鼻屎在那里,不问愚蠢的问题!

I currently have a file named ADOVBS.inc included at the top but would like to ditch it because I feel it's inefficient and wasteful. I'd like to define the constants as I need them- but I don't know how. What ADO constants would I need to define and where? The book that I'm using basically says "forget about that- pound include those 400 or so boogers in there and don't ask stupid questions!"

任何具体的例子/帮助将不胜AP preciated。

Any specific examples/help would be greatly appreciated.

谢谢,

推荐答案

您有几个选项可供选择。您可以参考元数据库在你的页面(或您的global.asa文件)

you have a couple of options to choose from. You can reference the metadata library in your page ( or in your global.asa file ) with

<!--
   METADATA    
   TYPE="TypeLib"    
   NAME="Microsoft ActiveX Data Objects 2.5 Library"    
   UUID="{00000205-0000-0010-8000-00AA006D2EA4}"    
   VERSION="2.5"
-->

您可以简单地复制从adovbs文件到您的网页,以满足您需要的常量。例如:

you can simply copy a few constants from the adovbs file into your page to cover your needs. For example

Const adCmdText = 1      'Evaluate as a textual definition    
Const adCmdStoredProc = 4 'Evaluate as a stored procedure

这篇关于ASP 3.0声明ADO常量瓦特/出含ADOVBS.INC的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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