HI,
I am having problems trying to compile a vb class, the code is below.
For some reason it doesn't recognise the namespaces, Data, or
Data.SqlClient.
In Visual Studio I have created a reference to System.Data, and
appears under references, but I can't seem to create one for
System.Data.SqlClient as it doesn't appear in the selection.
Another thing I should mention is that I am copying the vb class file
from our dev server onto my own machine and compiling it on my machine
using the VS.net compiler. I intend to copy and paste the dll into bin
on the dev server after.
What am I doing wrong??????
Thanks
Angela
-------------CODE-----------------------
Imports System
Imports System.Data
Imports System.Data.SqlClient
Public Class SQLTest
Public Shared Sub DeleteService(ByVal name As String, ByVal
strConnection As String)
Dim conPortal As New SqlConnection(strConnection)
Dim cmd As New SqlCommand("AdminDeleteService", conPortal)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add("@communityID", strConnection)
cmd.Parameters.Add("@name", name)
conPortal.Open()
cmd.ExecuteNonQuery()
conPortal.Close()
End Sub 'DeleteService
End Class