Not sure that I can help with the rest of it, but I can elaborate on the
constructors.

1    This is for databases that do not implement security, therefore,
there's no need to pass in a username or password
2    This is the standard username and password style of database security
and probably the most used constructor.
3    This is for non standard security models, or databases that simply need
additional information to decide whether
       you should be granted access.  For that matter any information could
be passed in the Properties object, such
       as the location of the data store or user authentication agent.

    (*Chris*)

----- Original Message -----
From: Geetanjali Jain <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 29, 1999 4:53 AM
Subject: JDBC and getconnection() usage


> GetConnection() has 3 constructors as:
>
> 1.      drivermanager.getConnection(String url)
> 2.      drivermanager.getConnection(String url, String usrname, String
> pswd)
> 3.      drivermanager.getConnection(String url, Properties info)
>
> I am using the jdbc:odbc bridge to connect to a database in SqlServer
> 6.5.
>
> A system DSN has been created for the purpose.
> I have been using the constructor no. 2 in which I specify the usr name
> and password with the url. i.e. I hardcode the username and password.
>
> I want to avoid this hardcoding.
> I tried using the constructor no. 1 with the system DSN but I got the
> message "login failed"
> I also tried with FILE DSN but it said "DSN not found and no driver
> specified"
>
> Can anyone suggest me the way to avoid this hardcoding and if it is
> possible to use "FILE" DSN in jdbc.
> Also elaborate on the usage of constructor nos 1 and 3.
>
> Thanking u in advance
> Geetanjali
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to