How to Open Visual Studio 2010 Project file on Visual Studio 2008

First, you need to convert visual studio 2010 solution file (.sln) to visual studio 2008 solution file (.sln) simply follow these steps:
  1. in .sln file replace:
    1.  "Format Version 11.00" to "Format Version 10.00"
    2. "# Visual Studio 2010" to "# Visual Studio 2008"
  2. in .csproj replace
    1. "ToolsVersion=''4.0''" to "ToolsVersion=''3.5''"
    2. "Microsoft\VisualStudio\v10.0" to "Microsoft\VisualStudio\v9.0"
After that, you can Open the Solution file and work normally.
 
Note: with the WEB Project, in Web.Config file, you should remove the line "<compilation debug="true" targetFramework="4.0" />" to run on Visual Studio 2008

Java - connect to SQL Server using JDBC ODBC in win 64bit

When I do my School Project (Create an Java App connect to an DB), I found it's can't be done in windows 64bit, so I search the Internet and I found my own way to finish it in Windows 64bit. Just follow these step below.

Step 1
Run the 32-bit odbc driver using
WinKey+R, then copy-paste the below command
C:\Windows\SysWOW64\odbcad32.exe

Step 2
Make a dsn named “SQLDB” or whatever name you want to.

Step 3
Create a new project in eclipse.

Step 4
Change the jre to the java installed inside
C:\Program Files (x86)\java
Use this as “JRE System Library”


Step 5
Use the below code to connect to connect to SQL Server (It's a SQL_Connection class)
import java.sql.*;


public class SQL_Connection {
    public static Connection GetConnection()
    {
        try{
     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
     Connection connect=DriverManager.getConnection("jdbc:odbc:SQLDB");
     return connect;
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
            return null;
        }
    }
    public static int ExecuteQueryString(String querystring)
    {
        try{
            Statement st= GetConnection().createStatement();
            return st.executeUpdate(querystring);
        }
        catch(Exception ex)
        {
            ex.printStackTrace();
        }
        return -1;
    }
    public static ResultSet getResultSet(String querystring)
    {
        try{
            Statement st= GetConnection().createStatement();
            ResultSet rs= st.executeQuery(querystring);
            return rs;
        }
        catch(Exception ex)
        {
            //ex.printStackTrace();
            return null;
        }
    }
    public static void Close_Connection(Connection conn)
    {
        try
        {conn.close();}
        catch(Exception ex)
        {}
    }
}
DONE!!!!

Tools - Get file attachment from selected mail list in Gmail account

This tools is my School Project, it useful when you have to download all attachment from a lot of mail in Gmail account.

Tools describe:
 - Login gmail through port 993 with SSL - Using IMAP
 - Have Filter to filter Email with the Subject condition, there has 3 method to filter "Begin with, Contains and End with". To clear Filter, press "Clear Filter" button or leave the Filter text blank and press "Go Filter"
 - An Email has Attachments will have prefix "[A]" in the email list and before email Subject
 - Load 50 emails per page, have "Go to Page" button to move to others page, and the "Next Page" button to move to next page or "Previous Page" to move back to the previous page
 - Select 1 or more emails, and Download Attachment of those email to the folder that user selected.

P/S: Each first running time, the program will running slow because it have to examine the data. If you have any problem when using this, please contact me. Thanks for using program.

Download here (MediaFire link)
Author: UK Tran

Sponsors