grammatical sense, what would be likely to be causing it?
I have a command component 'nxCmdDeleteErrorLogItem' with the following SQL:
Delete from ErrorLog where LogID = ?
LogID is a parameter corresponding to a DB field LogID which is an autoinc
field (the parameter is set at Int32).
I know the connection is ok (it works in the rest of the code, the only
problem occurs when I try to do this delete).
Thanks,
Lauchlan M
<<
Server Error in '/MyWebInterface_NexusDB' Application.
----------------------------------------------------------------------------
----
Connection must valid and open
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Connection must valid
and open
Source Error:
Line 351: nxCmdDeleteErrorLogItem.Parameters["LogID"].Value =
dGridErrorLog.DataKeys[e.Item.ItemIndex];
Line 352: nxConnection.Open();
Line 353: nxCmdDeleteErrorLogItem.ExecuteNonQuery(); // error occurs here
Line 354: nxConnection.Close();
Source File:
e:\inetpub\wwwroot\Mywebinterface_nexusdb\admin\vi ewerrorlog.aspx.cs
Line: 353
Stack Trace:
[InvalidOperationException: Connection must valid and open]
NexusDB.ADOProvider.NxCommand.ExecuteNonQuery()
MyWebInterface_NexusDB.Admin.ViewErrorLog.dGridErr orLog_DeleteCommand(Object
source, DataGridCommandEventArgs e) in
e:\inetpub\wwwroot\Mywebinterface_nexusdb\admin\vi ewerrorlog.aspx.cs:353
System.Web.UI.WebControls.DataGrid.OnDeleteCommand (DataGridCommandEventArgs
e) +110
System.Web.UI.WebControls.DataGrid.OnBubbleEvent(O bject source, EventArgs
e) +589
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.DataGridItem.OnBubbleEve nt(Object source,
EventArgs e) +106
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +26
System.Web.UI.WebControls.LinkButton.OnCommand(Com mandEventArgs e) +121
System.Web.UI.WebControls.LinkButton.System.Web.UI .IPostBackEventHandler.Rai
sePostBackEvent(String eventArgument) +115
System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler
sourceControl, String eventArgument) +18
System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +138
System.Web.UI.Page.ProcessRequestMain() +1277