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.
How to get specific data in sqlusing vs2008, sql 2005, asp.net VB
Page 1 of 1
2 Replies - 892 Views - Last Post: 26 October 2009 - 12:52 AM
Replies To: How to get specific data in sql
#2
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.
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.
#3
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.
then use data reader or bind it to grid view for viewing 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
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|