为何不能读取数据库?
<%
dim strconnect
strconnect = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source = ./data/bbjs.mdb;" & _
"Persist Security Info=False"
%>
保存为data.asp
index.asp页面的ASP内容:
<% Option Explicit
dim strconnect %>
````
<%
<!-- #include file="data.asp" -->
<%
dim objcommand,objrs
set objcommand = Server.CreateObject("ADODB.Command")
objcommand.ActiveConnection = strconnect
objcommand.commandtext = "select text from bjjs"
objcommand.commandtype = adcmdtext
set objrs = objcommand.execute
set objcommand = nothing
```` %>
当运行到objcommand.Activeconnection = strconnect 时就出现了问题,请各位多多指点,十分感谢!