亚洲AV无码乱码在线观看牲色,亚洲AV无码成人精品区狼人影院,亚洲高清无码专区视频http://m.tkk7.com/freefly/category/27348.html一門技術,如果不能講出來,那么就是沒有理解,如果不能很好的講出來,那么就是理解不夠透徹!zh-cnThu, 15 Nov 2007 17:34:49 GMTThu, 15 Nov 2007 17:34:49 GMT60some differences between oracle and sqlserverhttp://m.tkk7.com/freefly/archive/2006/12/31/91180.htmlfreeflyfreeflySun, 31 Dec 2006 07:42:00 GMThttp://m.tkk7.com/freefly/archive/2006/12/31/91180.htmlhttp://m.tkk7.com/freefly/comments/91180.htmlhttp://m.tkk7.com/freefly/archive/2006/12/31/91180.html#Feedback0http://m.tkk7.com/freefly/comments/commentRss/91180.htmlhttp://m.tkk7.com/freefly/services/trackbacks/91180.html
  • create view
  •           ORACLE:    CREATE OR REPLACE VIEW V_FA_ADD_CO AS

                 SQLSEVER:    IF EXISTS (SELECT 1
                                                                FROM  sysobjects
                                                                WHERE  idobject_id ('V_FA_ADD_CO')
                                                                 AND   type = 'V')
                                        DROP VIEW V_FA_ADD_CO;
                                        CREATE VIEW V_FA_ADD_CO AS

        
    2. the equal between join and (+)
          
           the table(its fields stay with (+)) right  join another  corresponding   table.
           for example: select * from a,b where a.id=b.id(+)
                   equals  select * from b rigth join a on a.id=b.id
                   equals  select * from a left join a on a.id=b.id

            notes:join先匹配有對應的記錄,
                  (+)卻是按順序來的
     

        3. substr,substring
         
    for example: there is a table's field "userName" and it's value is "wanghuiling".
           sqlserver: substring(userName,0,4) = "wan",substring(userName,1,4) = "wang"
           oracle:  substr(userName,0,4)="wang",substr(userName,1,4)="wang"
       
     4. link sign
         sqlserver: "+"
        
    oracle:"||"
     
    5. update a table's some fields

         for example:there are two tables: students1 and students2

         sqlserver:update students     (can't use alias)
                       set name=s2.name,sex=s2.sex,age=s2.age,tel=s2.tel
                       from students s2 where s1.id=s2.id;
         oracle: update students1 s1
                   set (name,sex,age,tel)=
                   (select name,sex,age,tel from students2 s2 where s1.id=s2.id);

    6. Date
        for example:there are a field of  date type:input_date  and its value is 2007-08-09.   
        sqlserver : year(input_date)=2007,month(input_date)=8,day(input_date)=9
         oracle : to_char(input_date,'YYYY')=2007, to_char(input_date,'MM')=8, to_char(input_date,'DD')=9

         sDate : a java String variable
         sqlserver : input_date = '"+sDate+"' 
         oracle : input_date =  to_char( '" + sDate + "',' 'YYYY-MM-DD'')



    freefly 2006-12-31 15:42 發表評論
    ]]>
    solution for mess code in struts+spring+hibernate+mysql4.1 http://m.tkk7.com/freefly/archive/2006/03/23/37026.htmlfreeflyfreeflyThu, 23 Mar 2006 05:07:00 GMThttp://m.tkk7.com/freefly/archive/2006/03/23/37026.htmlhttp://m.tkk7.com/freefly/comments/37026.htmlhttp://m.tkk7.com/freefly/archive/2006/03/23/37026.html#Feedback0http://m.tkk7.com/freefly/comments/commentRss/37026.htmlhttp://m.tkk7.com/freefly/services/trackbacks/37026.html Here is my solution for  mess code on page,hope this can help you!
     The point is your database coding should be consistent with the coding of  character that you plan to insert into the database.
     Attention: Here,I take "UTF-8" as default character coding way .
     There are three steps:
     1. set page charset 
         e.g      <%@ page language="java" contentType="text/html; charset=UTF-8" %>
        
     2. create character filter:
         package com.victory.util;

         import javax.servlet.http.HttpServlet;
         import javax.servlet.Filter;
         import javax.servlet.FilterConfig;
         import javax.servlet.ServletException;
         import javax.servlet.ServletRequest;
         import javax.servlet.ServletResponse;
         import javax.servlet.FilterChain;
         import javax.servlet.http.*;
         import java.io.IOException;
         public class CharacterEncodingFilter
           extends HttpServlet
           implements Filter {

           private FilterConfig filterConfig;
           private String targetEncoding = "ASCII";

         /**
          * Called by the web container to indicate to a filter that it is being placed
          * into service.
          *
          * @param filterConfig FilterConfig
          * @throws ServletException
          * @todo Implement this javax.servlet.Filter method
         */
          public void init(FilterConfig filterConfig) throws ServletException {
          this.filterConfig = filterConfig;
          this.targetEncoding = filterConfig.getInitParameter("encoding");
         }

        /**
         * The <code>doFilter</code> method of the Filter is called by the container
         * each time a request/response pair is passed through the chain due to a
         * client request for a resource at the end of the chain.
         *
         * @param request ServletRequest
         * @param response ServletResponse
         * @param chain FilterChain
         * @throws IOException
         * @throws ServletException
         * @todo Implement this javax.servlet.Filter method
         */
         public void doFilter(ServletRequest srequest, ServletResponse sresponse,
                           FilterChain chain) throws IOException, ServletException {
          try {
            HttpServletRequest request = (HttpServletRequest) srequest;
            request.setCharacterEncoding(targetEncoding);
            chain.doFilter(srequest, sresponse);
              }
          catch (ServletException sx) {
             filterConfig.getServletContext().log(sx.getMessage());
              }
          catch (IOException iox) {
             filterConfig.getServletContext().log(iox.getMessage());
            }
          }

        /**
         * Called by the web container to indicate to a filter that it is being taken
         * out of service.
         *
         * @todo Implement this javax.servlet.Filter method
         */
         public void destroy() {
           filterConfig = null;
           targetEncoding = null;
         }
      }
      
      3.config web.xml
        attention: add these to your web.xml
         <filter>
         <filter-name>EncodingFilter</filter-name>
         <filter-class>com.victory.util.CharacterEncodingFilter</filter-class>
         <init-param>
           <param-name>encoding</param-name>
           <param-value>UTF-8</param-value>
         </init-param>
        </filter>
        <filter-mapping>
        <filter-name>EncodingFilter</filter-name>
         <url-pattern>/*</url-pattern>
        </filter-mapping> 
      4.set database configration
         modify the file:    my.ini
         [client]     default-character-set=utf8 
         [mysqld]  default-character-set=utf8
      5.restart Mysql server
      6.modified your table coding way to utf8

         or ceate your table like this :
         CREATE TABLE `user` (
        `ID` int(11) NOT NULL auto_increment,
        `USERNAME` varchar(50) NOT NULL default '',
        `PASSWORD` varchar(50) NOT NULL default '',
         PRIMARY KEY  (`ID`)
         ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 
      7.restrart your tomcat sever

       OK,it's all.

       Authrougn I have sovled   my problem, I think I  don't have enough understanding for it,  So hope    communicate with you! 

       Attention:mess code also exist in your database,through page hasn't mess code.
       
         


       
      
           
         



    freefly 2006-03-23 13:07 發表評論
    ]]>
    主站蜘蛛池模板: 国产片免费福利片永久| 91九色老熟女免费资源站| 免费无遮挡无码永久在线观看视频| 亚洲成年人免费网站| 久久不见久久见免费视频7| 国产亚洲人成网站在线观看不卡| 亚洲精品视频免费 | 理论片在线观看免费| 日本大片在线看黄a∨免费| 亚洲av无码专区在线观看下载| 性做久久久久久久免费看| 亚洲乱码卡一卡二卡三| 好爽又高潮了毛片免费下载| 亚洲JLZZJLZZ少妇| 亚洲国产精品尤物YW在线观看| 免费福利在线观看| 丁香五月亚洲综合深深爱| a在线免费观看视频| 久久久无码精品亚洲日韩按摩| 国产福利在线免费| 亚洲av成本人无码网站| 亚洲精品国产精品国自产观看 | 亚洲黄色免费网址| 中文无码亚洲精品字幕| 国产免费人视频在线观看免费| 美女被爆羞羞网站免费| 亚洲成AV人片在线观看无| 4hu四虎最新免费地址| 亚洲欧美一区二区三区日产| 青青青国产色视频在线观看国产亚洲欧洲国产综合 | 国内精品免费麻豆网站91麻豆| 亚洲人成电影网站久久| 四虎永久免费地址在线网站| 国产国产人免费人成成免视频 | 亚洲综合久久1区2区3区| 免费网站看v片在线香蕉| 久久av免费天堂小草播放| 亚洲激情黄色小说| 午夜毛片不卡免费观看视频| 日产久久强奸免费的看| 亚洲AV无码1区2区久久|