Data Access Layer-- PART-2

BangaruBabu
Posted by BangaruBabu under ASP.NET category on | Views : 2148
public static int ExecuteNonQuery(string strQuery)
{
int num;
try
{
num = SqlHelper.ExecuteNonQuery(getConnection(), CommandType.Text,
strQuery);
}
catch (SqlException exception)
{
throw exception;
}
catch (Exception exception2)
{
throw exception2;
}
return num;
}
--------------

public static int ExecuteNonQuery(SqlTransaction transaction, string
strQuery)
{
int num;
try
{
num = SqlHelper.ExecuteNonQuery(transaction, CommandType.Text,
strQuery);
}
catch (SqlException exception)
{
throw exception;
}
catch (Exception exception2)
{
throw exception2;
}
return num;
}


-----------------
public static object ExecuteScalar(string strQuery)
{
object obj2;
try
{
obj2 = SqlHelper.ExecuteScalar(getConnection(), CommandType.Text,
strQuery);
}
catch (SqlException exception)
{
throw exception;
}
catch (Exception exception2)
{
throw exception2;
}
return obj2;
}

Comments or Responses

Login to post response