ASP的数据分析

ASP split()函数是分隔函数,最近工程用此函数成功将MYSQL导出来的数据转入MSSQL,下面是做的数据转换的部分代码。编程要用脚丫子才行。。。。。嘿嘿。。

------------------------------------

<!--#include file="conn.asp"-->
<%

content=Request("content")
con=Split(content,",)")
for i=0 to Ubound(con)'开始去的各个ID,i 是下标
    str=con(i)
     con1=Split(str,",")
For j=0 To UBound(con1)

   ting=Replace(con1(j),"'","")
Select Case j
    Case "0"
    id=ting
       response.write(id&"-")
    'conn.Execute "insert into [ly] ([id]) values('"&id&"')"
    Case "1"
    tim=ting
       'conn.Execute "insert into [ly] ([addtime]) values('"&tim&"')"
    Case "2"
    user_name=ting
    response.write(user_name&"-")
     conn.Execute "insert into [tab_user] ([user_name]) values('"&user_name&"')"
   Case "3"
    pwd=ting
    response.write(pwd&"-")
     conn.Execute "update [tab_user] set [pwd]='"&pwd&"' where adduser='"&user_name&"'"
   Case "4"
    true_name=ting
    response.write(true_name&"-")
    conn.Execute "update [tab_user] set [true_name]='"&true_name&"' where adduser='"&user_name&"'"
    Case "6"
    zjinfo=ting
    response.write(info&"-")
    conn.Execute "update [tab_user] set [user_zjhaoma]='"&zjinfo&"' where adduser='"&user_name&"'"
    Case "7"
    email=ting
    response.write(email&"-")
     conn.Execute "update [tab_user] set [user_email]='"&email&"' where adduser='"&user_name&"'"
    Case "8"
   phone=ting
    response.write(phone&"-")
    conn.Execute "update [tab_user] set [user_phone]='"&phone&"' where adduser='"&user_name&"'"
    Case "9"
    addr=ting
      response.write(addr&"-")
    conn.Execute "update [tab_user] set [user_address]='"&addr&"' where adduser='"&user_name&"'"
    Case "10"
    zip=ting
    response.write(zip&"-")
       conn.Execute "update [tab_user] set [user_post]='"&zip&"' where adduser='"&user_name&"'"
       Case "12"
      regtime=ting
    response.write(regtime&"-")
       conn.Execute "update [tab_user] set [regtime]='"&regtime&"' where adduser='"&user_name&"'"
   Case "13"
   sex=ting
    response.write(sex&"<BR>")
    conn.Execute "update [tab_user] set [user_sex]='"&user_sex&"' where adduser='"&user_name&"'"
    Case "14"
    birthday=ting
     conn.Execute "update [tab_user] set [user_shengri]='"&birthday&"' where adduser='"&user_name&"'"
    'response.write(birthday&"----")
   ' conn.Execute "insert into [ly] ([adduser]) values('"&name&"')"
    Case "15"
    marr=ting
    conn.Execute "update [tab_user] set [user_hunyan]='"&marr&"' where adduser='"&user_name&"'"
    'response.write(birthday&"----")
       Case "16"
    province=ting
     conn.Execute "update [tab_user] set [province]='"&province&"' where adduser='"&user_name&"'"
    'response.write(birthday&"----")
       Case "18"
    zhiwei=ting
     conn.Execute "update [tab_user] set [user_zhiwei]='"&zhiwei&"' where adduser='"&user_name&"'"
    Case "19"
    shouru=ting
     conn.Execute "update [tab_user] set [user_shouru]='"&shouru&"' where adduser='"&user_name&"'"
    Case "20"
    jiaoyu=ting
     conn.Execute "update [tab_user] set [user_jiaoyu]='"&jiaoyu&"' where adduser='"&user_name&"'"
    Case "21"
    hangye=ting
     conn.Execute "update [tab_user] set [user_hangye]='"&hangye&"' where adduser='"&user_name&"'"
    Case "22"
    beizhu=ting
     conn.Execute "update [tab_user] set [user_beizhu]='"&beizhu&"' where adduser='"&user_name&"'"
    Case Else

    s=ting
    End Select  
'ting=Replace(con1(j),"(","")
'ting=Replace(ting,"'","")
'ting=Replace(ting,")","")
'response.write(n&"")
     'response.write(ting&"<BR>")
' n=n+1
next
next
%>
<form method="POST" action="fenxi.asp" name="Form1">
<td> <textarea name="content" id="textarea" cols="95" rows="20"></textarea>
<input type="submit" value="提交" name="B1">
</form>

你可能感兴趣的:(response,update,asp)