.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Others >> Post New QuestionBookmark and Share Subscribe to Forum

How to Display Student ID Wise Datareport in Vb 6.0

Posted By: Sushil     Posted Date: April 15, 2010    Points:2   Category :Others
Hello I want to show student Datareport based on ID,when i enter Id in Text and then Click on Show Report then it will display Student Datareport for that ID Only with VB 6.0 amd MS ACCESS 2007

Responses
Author: Naresh             
Posted Date: April 15, 2010     Points: 5   

hi Sushil,

U can use Datagrid to display the records respective to ur ID.

OleDbConnection con2 = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data source=c:/m/Student.mdb");
con2.Open();
OleDbCommand cmd3 = new OleDbCommand("select * from Student where id='" + this.TextBox1.Text.Trim() + "'", con2);
DataTable t = new DataTable();
OleDbDataAdapter dr = new OleDbDataAdapter(cmd3);
dr.Fill(t);
this.DataGrid1.DataSource = t;
this.DataGrid1.DataBind();
con2.close();


Thanks
Malathy.v

Thanks
Naresh


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend