2010年2月25日 星期四

MySQL Like SQL Server With Nolock Use

  • Session Scope
          SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;
          SELECT * FROM TABLE_NAME ;
          SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ ;
  • Global Scope
          SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED ;

  • Isolation Level Variables
          SELECT @@global.tx_isolation;
          SELECT @@tx_isolation;

2010年2月24日 星期三

將中文(UTF-8) 寫入MySQL DB for Java Servlet

1. get request parameter before set Encode
    request.setCharacterEncoding("UTF-8");

2. add connection string parameter
    useUnicode=true&characterEncoding=UTF-8
  
    Ex.
      Connection conn =
          DriverManager.getConnection("jdbc:mysql://localhost/demo?
               useUnicode=true&characterEncoding=UTF-8", "userid", "password");

2010年2月8日 星期一

How about send sample mail use telnet

1. telnet smtp server








2. enter command step
    a. HELO <domain>
    b. MAIL FROM:<address>
    c. RCPT TO:<address>
    d. DATA
    e. SUBJECT:<mail title>
     f. <mail body>
    g. CRLF period CRLF
    h. QUIT

2010年2月5日 星期五

取得Web Site在Server端真正的路徑

protected void doGet(HttpServletRequest request,
HttpServletResponse response) throws ServletException, IOException {
   ...
   ServletContext context = getServletContext();
   String path = context.getRealPath("/");
   ...
}

2010年2月2日 星期二

Create Enterprise Architect Database

1. Create New Database







































2. Execute EA SQL Script
    download file : EA Database SQL Script




















3. Check EA DataBase Table List






















4. Create EA New Project

































5. Tools -> Data Management -> Select Project Transfer...















6. Select EAP to DBMS



















7. Select EAP File



















8. Select Database Connect





















9. Click Transfer Button



















10. Input Database Connect Password