您的位置:程序门 -> .net技术 -> vb.net



oledbcommand


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


oledbcommand[已结贴,结贴人:wangjianzhang]
发表于:2007-07-19 16:30:59 楼主
cmdline1   =   new   oledbcommand( "select起x,起y   from   gx   order   by   管线种类   where   管线种类= ' "   &   gxzl(j)   &   " ' ",   cn)
rdline1   =   cmdline1.EXECutereader
err:未处理的“system.data.oledb.oledbexception”类型的异常出现在   system.data.dll   中。
但cmdline1   =   new   oledbcommand( "select起x,起y   from   gx   order   by   管线种类 ",   cn)
rdline1   =   cmdline1.EXECutereader
却没有错误,什么原因?
发表于:2007-07-19 16:52:131楼 得分:0
gxzl(j)是什么类型的数据?
发表于:2007-07-19 16:55:522楼 得分:0
string
发表于:2007-07-19 18:51:143楼 得分:0
order   by   能写在where前面?!
真是高手!
发表于:2007-07-19 19:04:474楼 得分:20
cmdline1   =   new   oledbcommand( "select起x,起y   from   gx   order   by   管线种类   where   管线种类= ' "   &   gxzl(j)   &   " ' ",   cn)
=====================
cmdline1   =   new   oledbcommand( "select起x,起y   from   gx     where   管线种类= ' "   &   gxzl(j)   &   " ' "   &   "   order   by   管线种类 ",   cn)
发表于:2007-07-19 20:59:305楼 得分:0
select起x,起y
select   起x,起y   这里吗
发表于:2007-07-20 09:22:106楼 得分:0
where   管线种类=   ' "   &   gxzl(j)   &   "   若   gxzl(j)是“管线种类”字段的一部分(如“管线种类”为‘gx12'、‘gx13',而gxzl(j)为‘gx'),不用 "= "用其他的什么符号可以实现选择?
发表于:2007-07-20 10:06:327楼 得分:0
解决了,


快速检索

最新资讯
热门点击