Nisam pokušavao sa Access-om 2000, radio sam u Access-om 2003, mada sumnjam da to ima ikakve veze, ali pokušaj, možda ti nekim čudom i proradi. Ako budeš Želio mogu ti poslati ovo što sam ja radio (Source code + Access database), samo mi javi na koju adresu.
Pokušaj možda proradi sa null proslijeđenim UN!?
Citat:
Flitter:
Što se tiče uspostavljanja konekcije, da li mora da se koristi takva
konstrukcija u javi koja šalje i username i pass ili postoji neka druga
koja koristi samo pass?
Za ovakve stvari se ne pita! Za njih postoji Java-ina dokumentacija, ali dobro, evo izdvojio sam ti sve overload-ovane getConnection metode.
1.
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
2.
public static Connection getConnection(String url, String user, String password) 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
user - the database user on whose behalf the connection is being made
password - the user's password
Returns:
a connection to the URL
Throws:
SQLException - if a database access error occurs
3.
public static Connection getConnection(String url) 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
Returns:
a connection to the URL
Throws:
SQLException - if a database access error occurs