用于在特定范围内从db检索数据的编码. [英] Coding for retreving data from db in particular range.

查看:49
本文介绍了用于在特定范围内从db检索数据的编码.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以回答我吗:


低于Rs.500/-
Rs.500/-至Rs.1000/-

当我单击其中任何一个时,我都会获得该特定范围的所有详细信息.

Can Anyone Answer me:


Below Rs.500/-
Rs.500/- to Rs.1000/-

when i click any one of this i will get all detail of that particular range.

ple giv me a coding for this.

推荐答案

纳玛莎,
调用根据您的要求指定的命令对象,然后将数据集或数据读取器绑定到gridview.

示例:
Hi Narmatha,
Call the command object which specifies to your requirement.Then bind the dataset or data reader to the gridview.

Example:
SqlCommand cmd=new SqlCommand("select * from emp where salary<500",cn);

SqlCommand cmd=new SqlCommand("select * from emp where salary>=500 and salary<=1000",cn);


希望对您有帮助,
如果还有其他问题,请给我查询.


I Hope it helps you,
If any more problems, send me a query.


SELECT * FROM myTable WHERE price < 500





SELECT * FROM myTable where price BETWEEN 500 AND 1000


这篇关于用于在特定范围内从db检索数据的编码.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆