Sample Usage

Import line of code
// using Sql.DataAccessLayer;

Sample Code ExecuteNonQuery
SqlHelper.ExecuteNonQuery(Config.ConnectionString, CommandType.Text, "Delete From Table1 WHERE ID=?ID", new MySqlParameter("?ID", ID)); 


// Sample Code ExecuteScalar
StringBuilder query = new StringBuilder();
query.Append("Select count(ID) from Table1 WHERE username=?username");

return Convert.ToInt32(SqlHelper.ExecuteScalar(Config.ConnectionString, CommandType.Text, query.ToString(), new MySqlParameter("?username", UserName)));

Last edited May 2, 2013 at 10:19 PM by mediasoftpro, version 1

Comments

No comments yet.