Imports Microsoft.VisualBasic
Imports System
Imports System.Data
Imports System.Data.SqlClient
Imports System.Configuration
Public Class clsDatabase
Inherits System.Web.UI.Page
Private objConn As SqlConnection
Private objCmd As SqlCommand
Private Trans As SqlTransaction
Private strConnString As String
Private err As String
Public Sub New()
strConnString = System.Configuration.ConfigurationManager.AppSettings("ConnectionString").ToString **error บรรทัดนี้ค่ะ
End Sub
Public Function ConnOnly(ByVal xx As String) As DataTable
Dim dt As New DataTable
objConn = New SqlConnection
With objConn
.ConnectionString = strConnString
.Open()
End With
dt = objConn.GetSchema(xx)
Return dt
End Function
End Class
อยากทราบว่าผิดตรงไน๋อย่างไรน่ะค่ะ ขอบคุณค่ะ
Tag : .NET, Ms SQL Server 2005, Web (ASP.NET), VS 2008 (.NET 3.x)