欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
收集實(shí)用功能和經(jīng)典的Asp代碼片斷

<%    
  Set   msg   =   Server.CreateObject("JMail.Message")    
  msg.silent   =   true    
  msg.Logging   =   true    
  msg.Charset   =   "gb2312"    
  msg.MailServerUserName   =   "*****@126.com"   ''&Ecirc;&auml;&Egrave;&euml;smtp·&thorn;&Icirc;&ntilde;&AElig;÷&Ntilde;é&Ouml;¤&micro;&Ccedil;&Acirc;&frac12;&Atilde;&ucirc;   &pound;¨&Oacute;&Ecirc;&frac34;&Ouml;&Ouml;&ETH;&Egrave;&Icirc;&ordm;&Icirc;&Ograve;&raquo;&cedil;&ouml;&Oacute;&Atilde;&raquo;§&micro;&Auml;Email&micro;&Oslash;&Ouml;·&pound;&copy;    
  msg.MailServerPassword   =   "*****"     ''&Ecirc;&auml;&Egrave;&euml;smtp·&thorn;&Icirc;&ntilde;&AElig;÷&Ntilde;é&Ouml;¤&Atilde;&Uuml;&Acirc;&euml;     &pound;¨&Oacute;&Atilde;&raquo;§Email&Otilde;&Ecirc;&ordm;&Aring;&para;&Ocirc;&Oacute;&brvbar;&micro;&Auml;&Atilde;&Uuml;&Acirc;&euml;&pound;&copy;    
  msg.From   ="*****@126.com"'   Request.Form("email")         ''·&cent;&frac14;&thorn;&Egrave;&Euml;Email    
  msg.FromName   =   "&ETH;&iexcl;&raquo;&Ograve;"'Request.Form("name")       ''·&cent;&frac14;&thorn;&Egrave;&Euml;&ETH;&Otilde;&Atilde;&ucirc;    
  msg.AddRecipient   "*****@163.com"     ''&Ecirc;&Otilde;&frac14;&thorn;&Egrave;&Euml;Email    
  msg.Subject   =   "&ETH;&Aring;&frac14;&thorn;&Ouml;÷&Igrave;&acirc;"'Request.Form("subject")     ''&ETH;&Aring;&frac14;&thorn;&Ouml;÷&Igrave;&acirc;    
  msg.Body   =   "&Otilde;&yacute;&Icirc;&Auml;"'Request.Form("body")           ''&Otilde;&yacute;&Icirc;&Auml;    
  'msg.addattachment(server.mappath("new.txt"))  
  msg.Send   ("smtp.126.com")                 ''smtp·&thorn;&Icirc;&ntilde;&AElig;÷&micro;&Oslash;&Ouml;·&pound;¨&AElig;ó&Ograve;&micro;&Oacute;&Ecirc;&frac34;&Ouml;&micro;&Oslash;&Ouml;·&pound;&copy;    
  set   msg   =   nothing    
  response.write("·&cent;&Euml;&Iacute;&sup3;&Eacute;&sup1;&brvbar;&pound;&iexcl;")  
  %>Top

不好意思,重發(fā)一次:   

  <%    
  Set   msg   =   Server.CreateObject("JMail.Message")    
  msg.silent   =   true    
  msg.Logging   =   true    
  msg.Charset   =   "gb2312"    
  msg.MailServerUserName   =   "*****@126.com"   ''輸入smtp服務(wù)器驗證登陸名   (郵局中任何一個(gè)用戶(hù)的Email地址)    
  msg.MailServerPassword   =   "*****"     ''輸入smtp服務(wù)器驗證密碼     (用戶(hù)Email賬號對應的密碼)    
  msg.From   ="*****@126.com"'   Request.Form("email")         ''發(fā)件人Email    
  msg.FromName   =   "小灰"'Request.Form("name")       ''發(fā)件人姓名    
  msg.AddRecipient   "*****@163.com"     ''收件人Email    
  msg.Subject   =   "信件主題"'Request.Form("subject")     ''信件主題    
  msg.Body   =   "正文"'Request.Form("body")           ''正文    
  'msg.addattachment(server.mappath("new.txt"))  
  msg.Send   ("smtp.126.com")                 ''smtp服務(wù)器地址(企業(yè)郵局地址)    
  set   msg   =   nothing    
  response.write("發(fā)送成功!")  
  %>Top


 
  '本地提交  
   
  Function   isLocalPost()  
  server1   =   CStr(request.servervariables("http_referer"))  
  server2   =   CStr(request.servervariables("server_name"))  
  isLocalPost   =   true  
  If   Mid(server1,   8,   Len(server2))<>server2   Then  
  isLocalPost   =   false  
  End   If  
  End   Function  
   
  '訪(fǎng)問(wèn)者IP  
   
  Function   ip()  
          ip   =   request.servervariables("http_x_forwarded_for")  
          If   ip   =   ""   Then  
                  ip   =   request.servervariables("remote_addr")  
          End   If  
  End   FunctionTop


excel導入導出:  
   
  1  
  excel導放到數據庫    
  select   *   into   SQL中的表   from     OpenDataSource(   'Microsoft.Jet.OLEDB.4.0',  
      'Data   Source="e:\excel\tt.xls";User   ID=Admin;Password=;Extended   properties=Excel   5.0')...[Sheet1$]  
   
  二:數據庫導入到excel  
  EXEC   master..xp_cmdshell   'bcp   庫名.dbo.表名   out   f:\1.xls   -c   -q   -t,   -S"服務(wù)器名"   -U"用戶(hù)名"   -P"密碼"'  
   
   
  三,插入記錄到已有的excel中  
   
  1\如何從第十一行開(kāi)始追加記錄?  
  2\是否可以采用EXCEL的默認列,如"A:B:C:D"等來(lái)代替列名?  
   
   
  --1.你可以在Excel表的第10行隨便填一個(gè)數據,保證Excel表中,第10行至少有一個(gè)數據,10行之后沒(méi)有數據,這樣你可以用類(lèi)似下面的語(yǔ)句插入數據到Excel表中,可以保證數據插入在11行開(kāi)始追加  
  insert   into   OPENROWSET('MICROSOFT.JET.OLEDB.4.0'  
  ,'Excel   5.0;HDR=NO;DATABASE=c:\test.xls',Sheet1$)(F1,F2)  
  select   *   from   表  
  --2.如果你的列中是有數據的,可以用F1~Fn來(lái)代替列名  
   
  EG:insert   into   OPENROWSET('MICROSOFT.JET.OLEDB.4.0'  
  ,'Excel   5.0;HDR=NO;DATABASE=f:\book1.xls',Sheet1$)(f1,f2,f3,f4,f5,f6,f7)  
  select   manage_id,manage_name,manage_password,manage_rank,manage_regtime,manage_frontip,manage_fronttime   from   manage  
   
   
  四:插入到excel  
  insert   into   OpenDataSource(    
   
  'Microsoft.Jet.OLEDB.4.0','Data   Source="f:book1.xls";User   ID=Admin;Password=;Extended   properties=Excel   5.0')  
   
  ...[sheet1$](Code,name)   VALUES   ('20',   'Test')  
   

下面的是用一個(gè)標準的文本文件的內容創(chuàng )建一個(gè)數據表  
  ***********鄒建(access數據庫)**********************************************************************************************  
   
  --如果你要在sql中指定字段分隔符,則要寫(xiě)格式文件,無(wú)法在openrowset中指定字段分隔符  
   
  導入文本文件時(shí)如何指定字段類(lèi)型?  
   
  ===========================================================================  
  問(wèn)題:  
  我有一個(gè)文本文件需要導入   Access   ,但是文本文件中有一列數據原本是文本,  
  但是導入數據庫后自動(dòng)變成了“雙精度”類(lèi)型,我該如何讓各個(gè)字段按我需要的  
  數據類(lèi)型生成哪?  
   
  如何讓   ACCESS   按照我規定的構架、規格從文本文件、XLS文檔中導入數據?    
   
  ==========================================================================  
  方法:  
  用   Schema.ini   文件  
   
  作用:Schema.ini用于提供文本文件中記錄的構架信息。  
  每個(gè)   Schema.ini   項都用于指定表的五個(gè)特征之一:  
  1、文本文件名  
  2、文件格式  
  3、字段名、字段長(cháng)度、字段類(lèi)型  
  4、字符集  
  5、特別數據類(lèi)型轉換  
   
  ======================================================================  
  指定文件名  
  文件名要用方括號括起來(lái),例如如果要對   Sample.txt   使用數據構架信息文件,  
  那么它的對應的項應該是  
  [Sample.txt]    
   
   
  =======================================================================  
  指定文件格式  
  格式說(shuō)明                   表格式                               Schema.ini   格式描述    
  Tab   制表符分隔       文件中的字段用制表符分隔           Format=TabDelimited    
  CSV   分隔                   文件中的字段用逗號來(lái)分隔         Format=CSVDelimited    
  自定義分隔               文件中的字段可以用任何字符       Format=Delimited(自定義分隔符)  
                                    來(lái)分隔,所有的字符都可以  
                                    用來(lái)分隔,包括空格,但是  
                                  雙引號   (   "   )   除外    
                                  -   或者沒(méi)有分隔符   -                       Format=Delimited(   )  
  固定寬度                   文件中的字段為固定長(cháng)度      
   
   
  ===============================================================  
  指定字段  
   
  你可以有兩種方法在一個(gè)字符分隔的文本文件中指定字段名  
   
  1、在文本文件中的第一行包含字段名,并且設置   ColNameHeader   為   True   。  
  2、用數字編號指定每一列并且指定每一列的名字以及數據類(lèi)型  
   
  你必須用數字編號指定每一列并且指定每一列的名字、數據類(lèi)型以及長(cháng)度  
  (在固定長(cháng)度分隔的文本文件中需要指定長(cháng)度)  
   
  注意,設定了   ColNameHeader   選項,在   Schema.ini   中   Windows   注冊時(shí)會(huì )忽略  
  FirstRowHasNames   選項。  
   
  你也可以指定字段的數據類(lèi)型,使用   MaxScanRows   選項用來(lái)指定在確定列的  
  數據類(lèi)型時(shí)要掃描多少行數據。設置   MaxScanRows   為   0   將掃描整個(gè)文件。  
   
  如果文本文件第一行包含字段名,并且要掃描整個(gè)文件,改項目就要定義如下:  
  ColNameHeader=True  
  MaxScanRows=0    
   
  接下來(lái)的項目用來(lái)指定表中的字段,使用列編號(Coln)選項來(lái)指定列。字段長(cháng)度在  
  “固定分隔文本文件中”是必填項目,在“字符分隔文本文件”中是可選項目。  
   
  示例:定義   2   個(gè)字段,CustomerNumber   是長(cháng)度為   10   的文本字段、  
  CustomerName   是長(cháng)度為   30   的文本字段。  
   
  Col1=CustomerNumber   Text   Width   10  
  Col2=CustomerName   Text   Width   30    
   
   
  語(yǔ)法如下:  
  Coln=ColumnName   type   [Width   #]  
   
  參數解釋如下:  
  參數   說(shuō)明    
  ColumnName   文本,標識字段名,如果包含空格要用雙引號括起來(lái)    
  type   數據類(lèi)型包括:  
  Microsoft   Jet   數據類(lèi)型:Bit   Byte   Short   Long   Currency   Single   Double   DateTime   Text   Memo  
   
  ODBC   數據類(lèi)型:   Char   (same   as   Text)   Float   (same   as   Double)   Integer   (same   as   Short)    
  LongChar   (same   as   Memo)   Date   date   format  
   
  其中date   format   是日期的格式字符串例如:Date   YYYY-MM-DD    
     
  Width   字符串的長(cháng)度,后面的數字用來(lái)指定字段的長(cháng)度(“固定分隔文本文件”為必填,  
  “文字分隔文本文件”為可選)    
  #   整形數字,標識字段長(cháng)度    
   
   
  ===================================================================  
  指定字符集  
  CharacterSet   項有兩個(gè)選擇:ANSI   |   OEM  
  選擇   ANSI   字符集用如下方法:  
  CharacterSet=ANSI    
   
  ====================================================================  
  特別數據類(lèi)型轉換    
  特別數據類(lèi)型轉換主要是定義比如日期、貨幣型數據如何轉換或者如何顯示的,  
  你可以參考下面這張表:  
  選項   說(shuō)明    
  DateTimeFormat  
    Can   be   set   to   a   format   string   indicating   dates   and   times.   You   should   specify   this   entry   if   all   date/time   fields   in   the   import/export   are   handled   with   the   same   format.   All   Microsoft   Jet   formats   except   A.M.   and   P.M.   are   supported.   In   the   absence   of   a   format   string,   the   Windows   Control   Panel   short   date   picture   and   time   options   are   used.  
     
  DecimalSymbol  
    Can   be   set   to   any   single   character   that   is   used   to   separate   the   integer   from   the   fractional   part   of   a   number.    
     
  NumberDigits  
    Indicates   the   number   of   decimal   digits   in   the   fractional   portion   of   a   number.    
     
  NumberLeadingZeros  
    Specifies   whether   a   decimal   value   less   than   1   and   greater   than   -1   should   contain   leading   zeros;   this   value   can   either   be   False   (no   leading   zeros)   or   True.    
  CurrencySymbol  
    Indicates   the   currency   symbol   to   be   used   for   currency   values   in   the   text   file.   Examples   include   the   dollar   sign   ($)   and   Dm.  
     
  CurrencyPosFormat  
    Can   be   set   to   any   of   the   following   values:    
  ·   Currency   symbol   prefix   with   no   separation   ($1)    
   
  ·   Currency   symbol   suffix   with   no   separation   (1$)    
   
  ·   Currency   symbol   prefix   with   one   character   separation   ($   1)    
   
  ·   Currency   symbol   suffix   with   one   character   separation   (1   $)    
   
     
  CurrencyDigits  
    Specifies   the   number   of   digits   used   for   the   fractional   part   of   a   currency   amount.    
     
  CurrencyNegFormat  
    Can   be   one   of   the   following   values:    
  ·   ($1)    
   
  ·   -$1    
   
  ·   $-1    
   
  ·   $1-    
   
  ·   (1$)    
   
  ·   -1$    
   
  ·   1-$    
   
  ·   1$-    
   
  ·   -1   $    
   
  ·   -$   1    
   
  ·   1   $-    
   
  ·   $   1-    
   
  ·   $   -1    
   
  ·   1-   $    
   
  ·   ($   1)    
   
  ·   (1   $)    
   
  This   example   shows   the   dollar   sign,   but   you   should   replace   it   with   the   appropriate   CurrencySymbol   value   in   the   actual   program.  
   
     
  CurrencyThousandSymbol  
    Indicates   the   single-character   symbol   to   be   used   for   separating   currency   values   in   the   text   file   by   thousands.  
     
  CurrencyDecimalSymbol  
    Can   be   set   to   any   single   character   that   is   used   to   separate   the   whole   from   the   fractional   part   of   a   currency   amount.    
     
     
  ====================================================================  
  下面給出一個(gè)簡(jiǎn)單的例子,假設有一個(gè)表Contacts.txt類(lèi)似下面:  
  姓名   單位   聯(lián)系日期    
  王海   上海有機化學(xué)研究所   2002-1-1    
  羅炙   數字化機床研究院   2004-1-1      
   
   
   
  導入   Access   應該類(lèi)似下面表格:  
  姓名   單位   聯(lián)系日期    
  王海   上海有機化學(xué)研究所   2002-1-1    
  羅炙   數字化機床研究院   2004-1-1    
   
   
   
  那么   Schema.ini   則是類(lèi)似下面的INI文件:  
  [Contacts.txt]  
  ColNameHeader=True  
  format=Delimited(   )‘此處表示為用空格作分界符,如果是用分號的話(huà)則為:format=Delimited(;)  
  MaxScanRows=0  
  CharacterSet=ANSI  
  Col1="姓名"   Char   Width   10  
  Col2="單位"   Char   Width   9  
  Col3="聯(lián)系日期"   Date   Width   8    
   
   
  注釋如下:  
  [Contacts.txt]   ///文本文件名  
  ColNameHeader=True   ///帶有表頭  
  format=Delimited(   )   ///空格作為分隔符,如果是分號,請用format=Delimited(;)   來(lái)解決  
  MaxScanRows=0   ///掃描整個(gè)文件  
  CharacterSet=ANSI   ///ANSI   字符集  
  Col1="姓名"   Char   Width   10   ///字段1  
  Col2="單位"   Char   Width   9   ///字段2  
  Col3="聯(lián)系日期"   Date   Width   8   ///字段3  
  ///如果有更多字段可   Col4   ....   ColN      
   
   
  注意,Schema.ini   必須和需要導入的文本文件在同一目錄。  
   
  此后,我們就可以利用下面的語(yǔ)句來(lái)導入數據了:  
   
  CurrentProject.Connection.Execute   "SELECT   *   INTO   NewContact   FROM   [Text;FMT=Delimited;HDR=Yes;DATABASE=C:\;].[Contacts#txt];"T

完整示例(有移動(dòng),增加,刪除)  
  <SCRIPT   LANGUAGE="JScript">  
  function   se(se_text,se_value)  
  {  
  var   oOption   =   document.createElement("OPTION");  
  oOption.text=se_text;  
  oOption.value=se_value;  
  addselect.add(oOption);  
  }  
  function   cha(add_text,add_value)  
  {  
  var   oOption   =   document.createElement("OPTION");  
  oOption.text=add_text;  
  oOption.value=add_value;  
  addselect.add(oOption);  
  }  
   
  function   del(se_index)  
  {  
  addselect.remove(se_index);  
  }  
  </SCRIPT>  
  <SELECT   ID="oSelect"   NAME="Cars"   SIZE="13"   ondblclick="cha   (this.options[this.selectedIndex].text,this.value);">  
  <OPTION   VALUE="1"   SELECTED>寶馬  
  <OPTION   VALUE="2">保時(shí)捷  
  <OPTION   VALUE="3"   >奔馳  
  </SELECT>    
  ===>  
  <select   name="addselect"   SIZE="13"     ondblclick="del(this.selectedIndex);">  
  </select>  
  <input   name="se1"   type="text"   value="f"   >  
  <input   name="se2"   type="text"   value="2">  
  <input   type="button"   name="Submit"   value="增加"   onclick="se(se1.value,se2.value);">   

  call   downloadFile(Request("path"))  
   
  function   downloadFile(strFile)  
  strFilename   =   server.MapPath(strFile)  
   
  Response.Buffer   =   True  
  Response.Clear  
   
  Set   s   =   Server.CreateObject("ADODB.Stream")  
  s.Open  
   
  s.Type   =   1  
   
  on   error   resume   next  
   
   
  Set   fso   =   Server.CreateObject("Scripting.FileSystemObject")  
  if   not   fso.FileExists(strFilename)   then  
  Response.Write("<h1>Error:</h1>"   &   strFilename   &   "   does   not   exist<p>")  
  Response.End  
  end   if  
   
   
  Set   f   =   fso.GetFile(strFilename)  
  intFilelength   =   f.size  
   
   
  s.LoadFromFile(strFilename)  
  if   err   then  
  Response.Write("<h1>Error:   </h1>"   &   err.Description   &   "<p>")  
  Response.End  
  end   if  
   
  Response.AddHeader   "Content-Disposition",   "attachment;   filename="   &   f.name  
  Response.AddHeader   "Content-Length",   intFilelength  
  Response.CharSet   =   "UTF-8"  
  Response.ContentType   =   "application/octet-stream"  
   
  Response.BinaryWrite   s.Read  
  Response.Flush  
   
   
  s.Close  
  Set   s   =   Nothing  
   
   
  End   Function

本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
asp19個(gè)基本技巧
excel文件導入dbf2vfp
SQLITE_ERROR - table sap_capire_bookshop_books has no column named currency
ORACLE 常用的SQL語(yǔ)法和數據對象
oracle 修改字段名, 字段長(cháng)度的操作是什么?
Access教程 第二章 建立數據庫
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久