J
Julia
Hi All
I am getting the following exception:
General network error. Check your network documentation
System.Data.SqlClient.SqlException
From within my web application I connect to database on my local
machine and have a For Each loop round code that calls a stored
procedure:
Dim sqlConn As New
Dim intGroupRoleID As Integer = 500
Dim strSQL As String
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("connectionString"))
sqlConn.Open()
For Each dgItem In DGAppList.Items
‘ Get the next intPackageID
...
UpdateCmd.CommandText = "spAssignGroupRole"
UpdateCmd.CommandType = CommandType.StoredProcedure
UpdateCmd.Parameters.Add("@PackageID", SqlDbType.Int)
UpdateCmd.Parameters("@PackageID").Value = intPackageID
UpdateCmd.Parameters.Add("@GroupRoleID", SqlDbType.Int)
UpdateCmd.Parameters("@GroupRoleID").Value = intGroupRoleID
UpdateCmd.ExecuteNonQuery()
Next
sqlConn.Close()
The code above is just an extract and for clarity I have cut stuff out
so ignore syntax errors, undeclared variables, etc. The error does
not always occur either with the item nor does it necessarily occur at
all.
Has anyone got any ideas as to what can be causing this error, or
things that I can try to track down the problem.
Many thanks
Julia Beresford
I am getting the following exception:
General network error. Check your network documentation
System.Data.SqlClient.SqlException
From within my web application I connect to database on my local
machine and have a For Each loop round code that calls a stored
procedure:
Dim sqlConn As New
Dim intGroupRoleID As Integer = 500
Dim strSQL As String
SqlConnection(System.Configuration.ConfigurationSettings.AppSettings("connectionString"))
sqlConn.Open()
For Each dgItem In DGAppList.Items
‘ Get the next intPackageID
...
UpdateCmd.CommandText = "spAssignGroupRole"
UpdateCmd.CommandType = CommandType.StoredProcedure
UpdateCmd.Parameters.Add("@PackageID", SqlDbType.Int)
UpdateCmd.Parameters("@PackageID").Value = intPackageID
UpdateCmd.Parameters.Add("@GroupRoleID", SqlDbType.Int)
UpdateCmd.Parameters("@GroupRoleID").Value = intGroupRoleID
UpdateCmd.ExecuteNonQuery()
Next
sqlConn.Close()
The code above is just an extract and for clarity I have cut stuff out
so ignore syntax errors, undeclared variables, etc. The error does
not always occur either with the item nor does it necessarily occur at
all.
Has anyone got any ideas as to what can be causing this error, or
things that I can try to track down the problem.
Many thanks
Julia Beresford