I have a method for searching a db:
How can I use the override to just change the connectionstring?
C#:
public virtual ArrayList Search(string parameter, string columnName)
{
ArrayList al = new ArrayList();
myCommand = MyConnection.CreateCommand();
myCommand.CommandText = "SELECT * FROM Customer WHERE" +columnName+ "= '" + parameter + "'";
myReader = myCommand.ExecuteReader();
while(myReader.Read())
{
al.Add(myReader);
}
return al;
}
How can I use the override to just change the connectionstring?