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("",~) 然后放在数据里面
相关问答:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
DataSet导出xml 批处理(循环)得怎么处理
XML文件
<A>
<B>
<C>
</C>
&nb ......
--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 ......
21cn的邮箱,在outlook配置后可以正常收发邮件,可是我写在C#中就不行,换成其它邮箱,163很早注册的。可以发送。查了很久,没有找到原因,请高手帮忙解答。。。小弟,谢了。。代码如下:
private void SendMail ......
<table style="width: 1000px"><tr>
<td style="height: 38px; width: 35px;">
姓名</td>
......