百分求救asp.net2005连接sql2005时出错
在App_Code目录下,有文件BDcode.vb
Imports System.Data.SqlClient
Imports System.IO
Namespace Library
Public Class BDcode
Private connectingstring As String
Private myConn As SqlConnection
Private myAdapter As SqlDataAdapter
Private myCmd As SqlCommand
Public Sub New()
connectingstring = System.Configuration.ConfigurationManager.AppSettings( "DSN_manage ").ToString.Trim
myConn = New SqlConnection(connectingstring)
End Sub
Public Sub Open()
myConn.Open()
End Sub
Public Sub Close()
myConn.Close()
End Sub
'=============================================================
' 函 数 名:ExecNonSql
' 功能描述:执行无返回值的数据库操作
' 输入参数:sqlstr,查询的SQL字符串
' 返 回 值:无
' 创建日期:
' 修改日期:
' 作 者:
' 附加说明:
'==============================================================
Public Sub ExecNonOleDb(ByVal sqlstr As String)
myCmd = New SqlCommand(sqlstr, myConn)
myCmd.ExecuteNonQuery()
myCmd.Dispose()
Close()
End Sub
Public Function ExecReaderSql(ByVal sqlstr As String) &nbs