E
Eric Sabine
very easy I'm sure...
On the return statement, I get the object reference not set to an instance
of an object exception. I fully typed out the object paths for clarity,
i.e., the application blocks and the configuration settings.
thank, Eric
private int LogTransfer(string FileName, string Email, string UserName,
int Direction)
{
// Set up our 4 parameters
SqlParameter[] arParms = new SqlParameter[4];
arParms[0] = new SqlParameter("@filename", SqlDbType.VarChar, 200 );
arParms[0].Value = FileName;
arParms[1] = new SqlParameter("@email", SqlDbType.VarChar, 200);
arParms[1].Value=Email;
arParms[2] = new SqlParameter("@ssiuser", SqlDbType.VarChar, 200);
arParms[2].Value=UserName;
arParms[3] = new SqlParameter("@type", SqlDbType.SmallInt );
arParms[3].Value= Direction;
return (int)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(
System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString
"),
CommandType.StoredProcedure,
"webdata.dbo.usp_di_webFileTransferLog",
arParms);
}
On the return statement, I get the object reference not set to an instance
of an object exception. I fully typed out the object paths for clarity,
i.e., the application blocks and the configuration settings.
thank, Eric
private int LogTransfer(string FileName, string Email, string UserName,
int Direction)
{
// Set up our 4 parameters
SqlParameter[] arParms = new SqlParameter[4];
arParms[0] = new SqlParameter("@filename", SqlDbType.VarChar, 200 );
arParms[0].Value = FileName;
arParms[1] = new SqlParameter("@email", SqlDbType.VarChar, 200);
arParms[1].Value=Email;
arParms[2] = new SqlParameter("@ssiuser", SqlDbType.VarChar, 200);
arParms[2].Value=UserName;
arParms[3] = new SqlParameter("@type", SqlDbType.SmallInt );
arParms[3].Value= Direction;
return (int)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(
System.Configuration.ConfigurationSettings.AppSettings.Get("ConnectionString
"),
CommandType.StoredProcedure,
"webdata.dbo.usp_di_webFileTransferLog",
arParms);
}