Righto. My suspicion was that maybe your DSN was setup to use NT, rather
than SQL Server, authentication, but you've said below that you've set it up
with SQL Server authentication, so that blows that theory.
One thing though... You say that you've created a User DSN. I can't really
comment on that, I've only ever used System DSN's to connect to databases.
Just to eliminate it as a possible cause, I'd recommend setting your DSN up
as a System DSN (rather than a User DSN), making doubly sure that you set it
up to use SQL Server authentication (rather than NT authentication). Also,
when you setup the DSN, use the same logon you're going to enter into your
webpage (just to ensure it works) and make sure you run your DSN setup all
the way through to the Data Source Test that it offers at the end.
Give that a blast. On the one hand, I'd be surprised if that made a
difference (because, in theory, it shouldn't), but on the other hand,
sometimes you just have to run a check on these theories just to be sure :)
Let us know how it goes bro.
Rob
----- Original Message -----
From: "Fady Antoine Kaddoum" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, March 22, 2001 3:29 AM
> Hi Rob
>
> Yes, you're right sql7 and sql2000 have the same logon
> distinction. Moreover I am using the JDBC-ODBC bridge
> provided by SUN Microsystems in their jdk. I am using a
> User DSN in ODBC, with SQL Server logon.
>
> this is a part of the code:
>
> ...
> Connection con = null;
> Driver drv = (Driver)
> Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
>
> con =
> DriverManager.getConnection("jdbc:odbc:IntraDSN",(String)
> session.getAttribute("LOG"),(String)
> session.getAttribute("PASS"));
> ...
>
> -IntraDSN: is my User DSN (ODBC) on the machine where the
> tomcat server (containing the jsp files) is running
> -The LOG attribute and PASS attribute are the login and
> password provided by the user on a seperate page to connect
> to sql server with its priveledges...
>
> The problem is whatever the user puts as login and password
> the server (tomcat3.2) connects to MSSQL with the user that
> started it...at least this is what I think, after executing
> the sp sp_who on the SQL server
>
> Thanks
> Fady
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets