三天了都没解决的 VS2003类 转到 2005无法使用的问题 有详细说明!
Imports Microsoft.VisualBasic
Imports System.Data.SqlClient
Imports System.IO
Public Class DBController
Private connectingstring As String
Private myConn As SqlConnection
Private ds As Data.DataSet
Private myAdapter As SqlDataAdapter
Private mycmd As SqlCommand
Public Sub New()
System.Configuration.ConfigurationManager.AppSettings( "Connectionstring ").ToString.Trim()
myConn = New SqlConnection(connectingstring)
End Sub
Public Sub open()
myConn.Open()
End Sub
Public Sub close()
myConn.Close()
End Sub
Public Function Getds() As Data.DataSet
Return ds
End Function
'===================================================================
'函数名: Cest (测试模块)
'功能描述:执行无返回值的数据操作
'输入参数:sqlstr,getid(分为插入,修改,查询)
'返回值:查询返回 SqlDataReader对象,其他无返回值
'创建时间:2007.4.10
'修改时间:2007.4.10
'====================================================================
Public Sub Cest(ByVal sqlstr As String, ByVal getid As String)
Try
Select Case getid
Case "插入 "
myAdapter = New SqlDataAdapter(sqlstr, myConn)
ds = New Data.DataSet()
myAdapter.Fill(ds)
Case "修改 "
If myConn.State &nb