-
- asp取数据库中的表名
- Weather:-5~0度,风好大的春天
- 2009-03-13
<%'---------------读access库中的表名-------------------------
SET Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ="& Server.MapPath("库名称")
Set rstSchema = Conn.OpenSchema(20)
Do Until rstSchema.EOF
Response.Write "Table name:"& rstSchema(2)& "< br> "& "Table type:"& rstSchema(3)& "< br> < br> "
rstSchema.MoveNext
Loop
%>
<%'---------------读sql server库中的表名-------------------------
SET Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "Server=IP地址;Provider=sqloledb;Database=库名称;UID=用户名;PWD=密码;"
Set rstSchema=Conn.OpenSchema(20)
Do Until rstSchema.EOF
Response.Write "Table name:"& rstSchema(2)& "< br> "& "Table type:"& rstSchema(3)& "< br> < br> "
rstSchema.MoveNext
Loop
%><%'---------------读oracle库中的表名-------------------------
SET Conn=Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=MSDAORA.1;Password=密码;User ID=用户名;Data Source=数据源名称"
Set rstSchema=Conn.OpenSchema(20)
Do Until rstSchema.EOF
Response.Write "Table name:"& rstSchema(2)& "< br> "& "Table type:"& rstSchema(3)& "< br> < br> "
rstSchema.MoveNext
Loop'Response.Write("所在数据库名:" & rs(0) & "
")
'Response.Write("所有者:" & rs(1) & "
")
'Response.Write("表 名:" & rs(2) & "
")
'Response.Write("表的类型:" & rs(3) & "
")
%>- Views(5391) | Comments(0) | In web develop
-
- 在ASP文件中使用Python脚本
- Weather:多云 ,东南风 4-5级 ,最高气温3 ℃
- 2006-02-24
在ASP中使用Python脚本:
1.首先安装好Active Python,它自带了win32扩展,省得自己装了;
2.按照Active的附带文档说明,在%Python_home%/lib/site_packages/win32comext/axscript/client/目录中找到pyscript.py,双击运行之,此步骤在IIS中安装Python解释引擎;
3.新建一个asp文件,文件头用<%@ LANGUAGE = Python %>,告诉IIS此文件采用Python脚本;
4.剩下的就是按python语法编程了。
5...- Views(5330) | Comments(0) | In Python相关
