G
Guest
I have a project on a remote server consisting of a aspx page and a class. When I try to use the fill method of a sqldataadaptor to fill a dataset I get this error - Referenced object has a value of 'Nothing'. This works fine on my local machine. Below is some code to help show what I'm trying to do. I'm thinking permissions but what I have no idea, the project is using Windows Authenitication
Login.aspx cod
Imports PTS.PVBackoffic
Public Class Logi
Inherits System.Web.UI.Pag
Private m_BO As clsBackOffic
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
If Not Page.IsPostBack The
FillEmployees(
End I
End Su
Sub FillEmployees(
m_BO = New clsBackOffic
With cboEmployee
.DataSource = m_BO.GetEmployee
.DataMember = "Employees
.DataTextField = "EmpName
.DataValueField = "OperatorID
.DataBind(
End Wit
End Su
Class Backoffice code routine GetEmployee
Public Function GetEmployees() As DataSe
Dim dstEmployees As New DataSe
Tr
m_adp = New SqlDataAdapte
m_adp.SelectCommand = New SqlCommand("qryGetEmployees", g_cnnPTS
m_adp.Fill(dstEmployees, "Employees") <--- This line gives me the error on the remote server, a local server works fin
Return dstEmployee
Catch ex As Exceptio
'MessageBox.Show(ex.ToString
Finall
If g_cnnPTS.State = ConnectionState.Open The
g_cnnPTS.Close(
End I
If Not m_adp Is Nothing The
m_adp = Nothin
End I
End Tr
End Function
Login.aspx cod
Imports PTS.PVBackoffic
Public Class Logi
Inherits System.Web.UI.Pag
Private m_BO As clsBackOffic
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
If Not Page.IsPostBack The
FillEmployees(
End I
End Su
Sub FillEmployees(
m_BO = New clsBackOffic
With cboEmployee
.DataSource = m_BO.GetEmployee
.DataMember = "Employees
.DataTextField = "EmpName
.DataValueField = "OperatorID
.DataBind(
End Wit
End Su
Class Backoffice code routine GetEmployee
Public Function GetEmployees() As DataSe
Dim dstEmployees As New DataSe
Tr
m_adp = New SqlDataAdapte
m_adp.SelectCommand = New SqlCommand("qryGetEmployees", g_cnnPTS
m_adp.Fill(dstEmployees, "Employees") <--- This line gives me the error on the remote server, a local server works fin
Return dstEmployee
Catch ex As Exceptio
'MessageBox.Show(ex.ToString
Finall
If g_cnnPTS.State = ConnectionState.Open The
g_cnnPTS.Close(
End I
If Not m_adp Is Nothing The
m_adp = Nothin
End I
End Tr
End Function