4
Answers

What is the problem of searching Informaton in my code?

Joe Wilson

Joe Wilson

10y
1k
1
My code:

public DataTable SearchStudent_Number()
{
Connection C1 = new Connection();
return C1.ShowData("select * from Student where Student_Number like '" + this.Student_Number + "%'");
}

public DataTable SearchAverage()
{
Connection C1 = new Connection();
return C1.ShowData("select * from Student where Average like '" + this.Average + "%' ");
}

public DataTable SearchLastName()
{
Connection C1 = new Connection();
return C1.ShowData("select * from Student where LastName like '" + this.LastName + "%'");
}

public DataTable SearchField()
{
Connection C1 = new Connection();
return C1.ShowData("select * from Student where Field like '" + this.Field + "%'");
}
public DataTable SearchStudent_ID()
{
Connection C1 = new Connection();
return C1.ShowData("select * from Student where Student_ID like '" + this.Student_ID + "%'");
}
}
}
Answers (4)