易截截图软件、单文件、免安装、纯绿色、仅160KB

sql c#

在C#winForm中在一个textbox中输入3~5,我要写条sql语句具有select * from S where sn between 3 and 5的功能
3~表示大于3,  ~5表示小于5;
怎样在sql中将textbox中3~5分成3和5;
indexof("~")这样可以判定~符号的位置,"~"以前的就是3,"~"以后的就是5

substring2次
indexof(~) 
截取时  把 找到的~位置 -1找到3  +1 找到5

string str_condition=textbox.text;
string[] conditions=str_condtion.split('~');
conditions[0]=3  //'~'前面的数
conditions[1]=5  //'~'后的数
不明白去我的个人主页http://game.1c2c.com.cn

3~5
string[] arr=textbox.text.Split(new char[]{'~'},StringSplitOptions.RemoveEmptyEntries);

if(textbox.test=="3~5")
{
sql=select * from S where sn between 3 and 5
}
本人愚见!

string str_condition=textbox.text;
string[] conditions=str_condtion.split('~');
conditions[0]=3  //'~'前面的数
conditions[1]=5  //'~'后的数

indexof("~")这样可以判定~符号的位置,"~"以前的就是3,"~"以后的就是5

支持indexof()

split("",~) 然后放在数据里面


相关问答:

jsp链接sql2000的疑问?



type Exception report


message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jas ......

C# DataSet导出xml 批处理(循环)得怎么处理

DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
      <B>
        <C>
        </C>
  &nb ......

求一条SQL - MS-SQL Server / 疑难问题

--drop table #T1
--drop table #T2
create Table #T1(ID int,
QueryID nvarchar(20),
ResultID1 nvarchar(20),
ResultID2 nvarchar(20))
create Table #T2(SortNo int,
QueryID nvarchar(20),
ResultID1 nv ......

C#发邮件21cn

21cn的邮箱,在outlook配置后可以正常收发邮件,可是我写在C#中就不行,换成其它邮箱,163很早注册的。可以发送。查了很久,没有找到原因,请高手帮忙解答。。。小弟,谢了。。代码如下:
private void SendMail ......

sql 搜索语句 - .NET技术 / ASP.NET

<table style="width: 1000px"><tr>
  <td style="height: 38px; width: 35px;">
  姓名</td>
  ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号