当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 请问, 我装了windows 2003, 浏览网页时,看到的gif图,都不动,好象停在第一真。 这是为什么? ......
 ·鼠标变形问题    »显示摘要«
    摘要: asp访问数据库,当数据量大的时候,在asp查询数据的过程中我想让鼠标变形 当数据查询结束时,鼠标变回正常状态 ......


关于查询的问题

表单上有若干个文本框,每个文本框均是一个查询条件的输入框,当一个或几个文本框中有text的时候,就以他们作为并列的查询条件,进行查询。以一个button的click事件来触发。应该怎么实现呢?

NO.1   作者: changechange

sub   command1_click()  
          dim   strwhere   as   string  
   
          if   isnull(text1.value)=false   then  
                  strwhere=strwhere   &   "   and   field1="   &   text1.value   &   ""  
          end   if  
          if   isnull(text2.value)=false   then  
                  strwhere=strwhere   &   "   and   field2="   &   text2.value   &   ""  
          end   if  
          if   isnull(text3.value)=false   then  
                  strwhere=strwhere   &   "   and   field3="   &   text3.value   &   ""  
          end   if  
          dim   strsql   as   string  
          strsql="select   *   from   tableName   where   field_deleted=false   "   &   strwhere  
          dim   conn   as   string  
   
  end   sub

NO.2   作者: changechange

sub   command1_click()  
          dim   strwhere   as   string  
   
          if   isnull(text1.value)=false   then  
                  strwhere=strwhere   &   "   and   field1="   &   text1.value   &   ""  
          end   if  
          if   isnull(text2.value)=false   then  
                  strwhere=strwhere   &   "   and   field2="   &   text2.value   &   ""  
          end   if  
          if   isnull(text3.value)=false   then  
                  strwhere=strwhere   &   "   and   field3="   &   text3.value   &   ""  
          end   if  
          dim   strsql   as   string  
          strsql="select   *   from   tableName   where   field_deleted=false   "   &   strwhere  
          dim   strconn   as   string  
          dim   conn   as   new   adodb.connection  
          dim   rs   as   new   adodb.recordset  
          conn.open   "Provider=Microsoft.Jet.OLEDB.4.0;Data   Source=c:\1.mdb;User   ID=admin;Password=rr;Jet   OLEDB:Database   Password=1"  
          rs.open   conn,1,1  
          do   until   rs.eof  
                  ...  
                  rs.movenext  
          loop  
          rs.close  
          set   rs=nothing  
   
  end   sub  
 


 ·数据库菜鸟提问啦    »显示摘要«
    摘要: 我想做一个数据库小程序,前端用c++,后台用access,行吗?有没有好的文章推荐一下给我!谢谢啦 :d ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE