0

I want to display my record from the SQL Server db can some help me with the function I need?

I am using C#, SQL Server 2005, the table is created with name and address etc.... etc, I insert it successfully is connected now I want to get the record from the table

4
  • 1
    Please clarify display. Would that be in a data grid? In a console window? Somewhere else entirely? Commented Nov 20, 2010 at 12:21
  • in windows form app data grid Commented Nov 20, 2010 at 12:22
  • 1
    You have provided very little information, not enough for anyone to be able to help. How are you accessing the database (what technology)? What is/are the table/s name/s? What data do you need to display? Commented Nov 20, 2010 at 12:23
  • @marc: its not issue put any name and any columns use the display query to display result in windows form not console.. display it in any thing i want jusy the basic method Commented Nov 20, 2010 at 12:38

2 Answers 2

4

Your question is unclear but I think you need something like this. and here how to connect a data grid view to a DB.

Sign up to request clarification or add additional context in comments.

Comments

0

You have lots of options:

  • straight ADO.NET - use SqlConnection and SqlCommand to grab e.g. DataSets, or data readers, to handle your data

  • use some kind of an ORM, like Linq-to-SQL, Entity Framework, NHibernate or something else, to turn your database rows and columns into .NET objects

  • custom code - roll your own ORM or do something else to your liking

Due this vast array of options, it's really hard to know what you're looking for - which options are you interested in?? ADO.NET ? ORM (which one?) ??

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.