Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Need help in retrieving and posting data to the database (ms access) from C#.net

Software Development


Reply
 
Thread Tools Search this Thread
  #1  
Old 13-03-2012
KJo KJo is offline
Member
 
Join Date: Feb 2012
Posts: 125
Need help in retrieving and posting data to the database (ms access) from C#.net
  

I have just now completed C#.net and I have created form as well as the database connection using ms acess but then I donít have much knowledge in retrieving and posting data to the database, is there anyone who has an idea about the same and can help me out with it??? Any help regarding this will be highly appreciated.

Reply With Quote
  #2  
Old 13-03-2012
Member
 
Join Date: Mar 2010
Posts: 143
Re: Need help in retrieving and posting data to the database (ms access) from C#.net

Quote:
I have just now completed C#.net and I have created form as well as the database connection using ms acess but then I don’t have much knowledge in retrieving and posting data to the database, is there anyone who has an idea about the same and can help me out with it??? Any help regarding this will be highly appreciated.
You have not mentioned the scenario in your case, I mean the table name and the code that you might be trying out, if you need help from the start then you can just check out the below guide and see if it is helping:
How to retrieve and display records from an Access database by using ASP.NET,ADO.NET, and Visual C# .NET
Reply With Quote
  #3  
Old 14-03-2012
Member
 
Join Date: May 2009
Posts: 531
Re: Need help in retrieving and posting data to the database (ms access) from C#.net

If you want then you can try out the below code, here the name of the table is customer information, when you will enter the customer name in one text then you will get the other information of the customer in other text boxes, if you have much idea about the card then you wonít have issues in understanding the below code:
Quote:
con.Open();
str = "Select * from customerinfo where(cname='" + textBox1.Text + "')";

cmd = new SqlCommand(str, con);
dr = cmd.ExecuteReader();
if(dr.HasRows)
{
while (dr.Read())
{
textBox2.Text = dr["customerid"].ToString();
textBox3.Text = dr["address"].ToString();
textBox4.Text = dr["contactno"].ToString();
textBox5.Text = dr["email"].ToString();
}
con.close();
dr.close();
}
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Need help in retrieving and posting data to the database (ms access) from C#.net"
Thread Thread Starter Forum Replies Last Post
Silverlight 4 WCF returns NOT FOUND message when posting large data Sonia G Software Development 5 04-08-2010 09:47 AM
Inserting and retrieving images from Database Ainsley Software Development 3 25-01-2010 12:49 PM
Retrieving data from an XML file for use in a servlet VinFanatic Software Development 3 12-05-2009 06:03 PM
How to retrieving data in a file from Creating form MARCIA Software Development 3 10-03-2009 11:18 AM
Retrieving data from damaged HDD Adit Hardware Peripherals 2 22-11-2008 04:23 PM


All times are GMT +5.5. The time now is 07:53 PM.