ExecuteNonQuery -> Unexpected error message
From: James Dixon (jamessdixon_at_yahoo.com)
Date: 08/30/04
- Next message: Brendan Reynolds: "Re: Access 97 (dao) to 2003 (Ado)"
- Previous message: Craig: "RE: Set the selected record in a List Box"
- Next in thread: William \(Bill\) Vaughn: "Re: ExecuteNonQuery -> Unexpected error message"
- Reply: William \(Bill\) Vaughn: "Re: ExecuteNonQuery -> Unexpected error message"
- Reply: Val Mazur: "Re: ExecuteNonQuery -> Unexpected error message"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 30 Aug 2004 10:14:49 -0400
I have a 2 tier app with IIS6 hitting a 2K database via a code snippet in
Session_Start (below)
What's odd is that it is generating a ADODB.Field error '80020009' (Either
BOF or EOF is true, or the current record has been deleted. Requested
operating requires a current record) on some machines.
My questions:
1) I am not using a datatable, so how can I get a BOF/EOF?
2) Why isn't the catch, well, cathing this???
SqlConnection cn = new SqlConnection(strCN);
SqlCommand cmdLogVisit = new SqlCommand("usp_InsertVisitLog", cn);
cmdLogVisit.CommandType = CommandType.StoredProcedure;
SqlParameter prmIPAddress = new SqlParameter();
prmIPAddress.ParameterName = "@IPAddress";
prmIPAddress.SqlDbType = SqlDbType.VarChar;
prmIPAddress.Size = 15;
prmIPAddress.Direction = ParameterDirection.Input;
cmdLogVisit.Parameters.Add(prmIPAddress);
try
{
prmIPAddress.Value = Request.UserHostAddress;
cn.Open();
cmdLogVisit.ExecuteNonQuery();
}
catch(Exception e)
{
}
finally
{
cn.Close();
}
- Next message: Brendan Reynolds: "Re: Access 97 (dao) to 2003 (Ado)"
- Previous message: Craig: "RE: Set the selected record in a List Box"
- Next in thread: William \(Bill\) Vaughn: "Re: ExecuteNonQuery -> Unexpected error message"
- Reply: William \(Bill\) Vaughn: "Re: ExecuteNonQuery -> Unexpected error message"
- Reply: Val Mazur: "Re: ExecuteNonQuery -> Unexpected error message"
- Messages sorted by: [ date ] [ thread ]