I am using sql server and c# (windows application)>>
the task is to retrieve records from table in the database and view it in page load , with the abilty to choose the records >>
this means that select range >>> e.g. from 3 to 7 (this can done by textbox)
so how can i do this >>
then I shall have two search buttons ( by name and by id) >> how can I implement that >>>
the last thing is to do the validation for every thing i can validate how I can do this >>>
thank u at the beginning for help me
adorer:
I am using sql server and c# (windows application)>>
Since you are writing a Windows application, and these forums are for ASP.NET, you should post your question on theMSDN forums.
|||SqlConnection cn =
new SqlConnection("User ID=sa;password=;Initial Catalog=Training;Data Source=local");cn.Open();
DataSet ds =
new DataSet();SqlDataAdapter da =
new SqlDataAdapter("select * from Students where ID = '"+ textBox1.Text + "'", cn);
da.Fill(ds, "Students");
dataGrid1.DataSource = ds;
cn.Close();
does this do the task
No comments:
Post a Comment