Hi,
I implemented everything as described, but now I get the following error upon creating a new connection now and then:
A severe error occurred on the current command. The results, if any, should be discarded.
From these lines:
SqlCommand _SqlCommand = new SqlCommand();
_SqlCommand.Connection = _SqlConnection;
_SqlCommand.CommandType = CommandType.StoredProcedure;
_SqlCommand.CommandText = "sp_setapprole";
_SqlCommand.Parameters.Add(new SqlParameter("@rolename", _RoleName));
_SqlCommand.Parameters.Add(new SqlParameter("@password", _Password));
_SqlCommand.Parameters.Add(new SqlParameter("@fCreateCookie", true));
SqlParameter _CookieSqlParameter = new SqlParameter("@cookie", SqlDbType.VarBinary, 8000);
_CookieSqlParameter.Direction = ParameterDirection.Output;
_SqlCommand.Parameters.Add(_CookieSqlParameter);
try
{
_SqlCommand.ExecuteNonQuery(); <<-----------
m_CookieByteArray = _CookieSqlParameter.Value as byte[];
}
finally
{
_SqlCommand.Dispose();
}
It's a sort of at random, any suggestions?
It's a SQL 2008 DB, 64-bit. Using LLBLGen 2.6, Adapter.
http://support.microsoft.com/kb/938102/en-us