定义odbc的时候 会要求你输入相关数据库密码,
然后如果odbc 没定 密码 ,数据库连odbc 也不要密码

解决方案 »

  1.   

    在JDBC_URL中可能包含用户名和密码
      

  2.   

    env中包含了usename,password,具体你可以看看jdk的文档,下面是getConnection的描述:public static Connection getConnection(String url,
                                           Properties info)
                                    throws SQLException
    Attempts to establish a connection to the given database URL. The DriverManager attempts to select an appropriate driver from the set of registered JDBC drivers.
    Parameters:
    url - a database url of the form jdbc:subprotocol:subname
    info - a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included
    Returns:
    a Connection to the URL
    Throws:
    SQLException - if a database access error occurs