使用ADO批量更新记录(源代码)

2016-01-29 17:57 60 1 收藏

使用ADO批量更新记录(源代码),使用ADO批量更新记录(源代码)

【 tulaoshi.com - ASP 】

  '**************************************
    ' Name: Batch Update using ADO
    ' Description:ADO has a great batch upda
    '     te feature that not many people take adv
    '     antage of. You can use it to update many
    '     records at once without making multiple
    '     round trips to the database. Here is how
    '     to use it.
    ' By: Found on the World Wide Web
    '
    '
    ' Inputs:None
    '
    ' Returns:None
    '
    'Assumes:None
    '
    'Side Effects:None
    '
    'Warranty:
    'code provided by Planet Source Code(tm)
    '     (http://www.Planet-Source-Code.com) 'as
    '     is', without warranties as to performanc
    '     e, fitness, merchantability,and any othe
    '     r warranty (whether expressed or implied
    '     ).
    '**************************************
    
    <HTML
    <HEAD<TITLEPlace Document Title Here</TITLE</HEAD
    <BODY BGColor=ffffff Text=000000
    <%
    Set cn = Server.CreateObject("ADODB.Connection")
    Set rs = Server.CreateObject("ADODB.RecordSet")
    cn.Open Application("guestDSN")
    rs.ActiveConnection = cn
    rs.CursorType = adOpenStatic
    rs.LockType = adLockBatchOptimistic
    rs.Source = "SELECT * FROM authors"
    rs.Open
    If (rs("au_fname") = "Paul") or (rs("au_fname") = "Johnson") Then
    newval = "Melissa"
    Else
    newval = "Paul"
    End If
    If err < 0 Then
    %
    <BError opening RecordSet</B
    <% Else %
    <BOpened Successfully</B<P
    <% End If %
    <H2Before Batch Update</H2
    <TABLE BORDER=1
    <TR
    <% For i = 0 To rs.Fields.Count - 1 %
    <TD<B<%= rs(i).Name %</B</TD
    <% Next %
    </TR
    <% For j = 1 To 5 %
    <TR
    <% For i = 0 To rs.Fields.Count - 1 %
    <TD<%= rs(i) %</TD
    <% Next %
    </TR
    <%
    rs.MoveNext
    Next
    rs.MoveFirst
    %
    </TABLE
    Move randomly In the table and perform upd

来源:https://www.tulaoshi.com/n/20160129/1503705.html

延伸阅读
标签: PHP
  其实写这几篇代码的时间不过近三天而已,事前即没有经过详细思考和计划(可以说一点计划都没有)那天想起做个论坛试试,于是就做起来了,而我也是才接触了将近一个月时间的PHP,以前也没真正写过程序之类的东东,在写这段代码的两天半时间里,有好几次遇到困难,都想放弃,但是我还是写出来了,而且没想到居然能用,所以中间可能有很多...
标签: PHP
  主界面,也就是显示主题列表的这页。 //foxbbs.php 功能:显示论坛的主题 <HTML <HEAD <TITLE狐网论坛</TITLE <STYLE type=text/css P {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt} DIV {FONT-FAMILY: normal; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt} </STYLE <LINK href="js/lfox.css&...
最后我们要做的工作,就是把每一页,或者你认为重要的关键的页面进行加密,就OK啦。怎样对网页的源代码进行加密就不用我多说了吧?网上到处都有,可以用工具,也可以自己写一个htm文件来转换。加密软件,我推荐“Batch HTML Encryptor”,去google找吧。还有转换加密网页的代码如下: 〈HTML〉〈HEAD〉〈TITLE〉网页加密解密〈/TITLE〉 ...
标签: Web开发
bugtraq id 1500 class Access Validation Error cve GENERIC-MAP-NOMATCH remote Yes local Yes published July 24, 2000 updated July 24, 2000 vulnerable IBM Websphere Application Server 3.0.21 - Sun Solaris 8.0 - Microsoft Windows NT 4.0 - Linux kernel 2.3.x - IBM AIX 4.3 ...

经验教程

496

收藏

86
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部