Sloan, suppose I am the following code in a class (.vb) file:
Imports System
Imports System.Data
Imports System.Data.SqlClient
Public Class DBSettings
Public sqlCmd As SqlCommand
Public sqlConn As SqlConnection
Private ConnectionString As String
Public Function QueryDB(ByVal qry As String) As SqlDataReader
sqlConn = New SqlConnection(ConnString)
sqlCmd = New SqlCommand(qry, sqlConn)
sqlConn.Open()
Return sqlCmd.ExecuteReader
sqlConn.Close()
End Function
End Class
Now which namespace will the above class belong to? I use Visual Web
Developer 2005 (& not VS.NET) to create & edit ASP.NET applications
(using VB.NET & not C#).
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.