Showing posts with label erroranother. Show all posts
Showing posts with label erroranother. Show all posts

Monday, March 19, 2012

Another SqlParameterCollection include ParameterName“@Id” SqlParameter。

error:
Another SqlParameterCollection include ParameterName"@.Id" SqlParameter?

if I remove one of " RunProc("test",param);" ,there will be right

private void Page_Load(object sender, System.EventArgs e)
{
SqlParameter param = new SqlParameter("@.Id", SqlDbType.Int);
param.Value = 1;

RunProc("test",param);
RunProc("test",param); //if i remove this line ,it's OK
}
public void RunProc(string procName, SqlParameter pram)
{
SqlConnection con = new SqlConnection(ConfigurationSettings.AppSettings["ConnectionString"]);
con.Open();

SqlCommand cmd = new SqlCommand(procName, con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(pram);
cmd.ExecuteNonQuery();

con.Close();
}You can't use the same SqlParameter multiple times. Try something like this:

private void Page_Load(object sender, System.EventArgs e)
{
SqlParameter param = new SqlParameter("@.Id", SqlDbType.Int);
param.Value = 1;
RunProc("test",param);

SqlParameter param2 = new SqlParameter("@.Id", SqlDbType.Int);
param2.Value = 1;
RunProc("test",param2);
}

Wednesday, March 7, 2012

Another archival or restoration process is currently . . .

I have a user getting the following error:

Another archival or restoration process is currently in progress on this computer. Cannot continue archival at this time.

I am told that this server is functioning otherwise. Copy and Backup functions seem to cause this error.

Anyone have any idea where to start - I've turned up very little searching forums and the Internet on this error message.

Hi,

This happens with Analysis Services 2000 or 2005 ? If it's 2005, I'm not sure what you mean by Copy function (in AS2000 I assume it's copy database in Analysis Manager).

Adrian

|||This happening on a Analysis Services 2000 server.

What the user is doing - looks like a right mouse click on a cube - then choosing Archive Database. She thne clicks on Archive - thats when she gets the error.

The window also says - you have choosen to archive a database on a remote server. Please comfirm the path - we have verified that she has rights to the path.