我想将我的网页从 Asp 经典转换为 Asp.net (VB),我应该做什么来代替这段代码?
连接.asp:
<%
Dim conn,connstr
connstr = "Provider=sqloledb; Data Source=.\SQLEXPRESS ;Initial Catalog=My_DB ;User Id=sa;Password=12345"
on error resume next
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
if err then
err.clear
set conn=nothing
response.write "Connect Error!"
response.End
End IF
%>
感谢您的时间!