How to get specific data in sql

using vs2008, sql 2005, asp.net VB

Page 1 of 1

2 Replies - 1192 Views - Last Post: 26 October 2009 - 12:52 AM Rate Topic: -----

#1 syahman  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 6
  • Joined: 24-October 09

How to get specific data in sql

Posted 24 October 2009 - 10:57 PM

how is command for get the specific data such as price in the table in where the condition is the name and insert into the textbox. i want this data for the calculation. anyone can show the example coding will helpful.
Is This A Good Question/Topic? 0
  • +

Replies To: How to get specific data in sql

#2 Core  Icon User is offline

  • using System.Linq;
  • member icon

Reputation: 774
  • View blog
  • Posts: 5,097
  • Joined: 08-December 08

Re: How to get specific data in sql

Posted 25 October 2009 - 08:08 AM

Basically, you have to start with SQL basics. I see that you are working with VB.NET, here is a tutorial that will guide you through the fundamentals of SQL in C#, but you can easily adapt it to VB.NET.

To accomplish your specific task, you will only have to build a unique SQL query, therefore I would strongly advice you to take a look at several SQL tutorials to get the basic understanding of how it all works.
Was This Post Helpful? 1
  • +
  • -

#3 ramesh866  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 91
  • Joined: 03-October 09

Re: How to get specific data in sql

Posted 26 October 2009 - 12:52 AM

its pretty simple.. use this command obj to retrieve the data.
		SqlCommand cmd = new SqlCommand("select price from product_table where product_name='"+TextBox1.Text+"'",cn);



then use data reader or bind it to grid view for viewing the data
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1