XML连接ACCeSS数据库? ASP问题?急急...

来源:百度知道 编辑:UC知道 时间:2024/06/19 15:20:48
求一个XML文件连接数据库的代码,
最好ACCESS的。还要写如何获取数据库记录!谢谢各位拉。
<artworkinfo>
<albuminfo>
<artLocation>images/album1.jpg</artLocation>
<artist>The Doors</artist>
<albumName>Greatest Hits</albumName>
<artistLink>http://www.zcool.com.cn</artistLink>
<albumLink>http://www.zcool.com.cn</albumLink>
</albuminfo>

</artworkinfo>

帮我看看怎么从数据库读取记录在里面!
还有。 <artLocation>images/album1.jpg</artLocation>
<artist>The Doors</artist>
<albumName>Greatest Hits</albumName>
<artistLink>http://www.zcool.com.cn</ar

你看看段代码,可能对你有所帮助:
<%
Response.ContentType="application/xml"
Response.Expires=0
Response.Write("<?xml version=""1.0"" encoding=""utf-8"" ?>")

%>
<AccessManager>
<%
DB_Name=request("dbname")
if inStr(DB_Name,":/")=0 and inStr(DB_Name,":\")=0 then
DB_Name=server.mappath(DB_Name)
end if
Set CONN = Server.CreateObject("ADODB.CONNection")
'on error resume next
CONN.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="&DB_Name
if err.number<>0 then
response.write "<error>Error"&err.description&"</error>"
err.clear
end if

Const adSchemaTables = 20
Const adSchemaColumns = 4
dim rstSchema
Set rstSchema = conn.OpenSchema(adSchemaTables)
Do Until rstSchema.EOF
I