Here is sample code for creating a data access class. It's not ground breaking code <smiles>, it's just handy to have it here when I start a new project
Imports System.Data
Imports Microsoft.ApplicationBlocks.Data
Imports System.Data.SqlClient
Public Class facIV00300
Dim m_cs As String
Public Property ConnectionString() As String
Get
Return m_cs
End Get
Set(ByVal value As String)
m_cs = value
End Set
End Property
Sub New(ByVal connectionString As String)
m_cs = connectionString
End Sub
Sub New()
End Sub
Function IV00300_SEL_byItem(ByVal strItemNumber As String, ByVal strLocationCode As String) As SqlDataReader
Return SqlHelper.ExecuteReader(m_cs, CommandType.StoredProcedure, "_4P_myProc", _
New SqlParameter("@Itemnmbr", strItemNumber), _
New SqlParameter("@locncode", strLocationCode))
End Function
End Class