on 09-01-2006 9:13 AM
I have used this document (https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6209b52e-0401-0010-6a9f-d40ec3a09424)
to install the jtds-1.2.jar sqlserver jdbc driver.
Then I tested the connection using the test servlet (step 15 from the document) at http://<hostname>:<port>/TestJDBC_Web/TestJDBCPage.jsp.
It succesfully makes a connection to my sqlserver, but it shows the tables from the master db and not my test database....
In the Connection Container I entered the following properties in Managed Connection Factory:
DriverName = net.sourceforge.jdts.jdbc.Driver
FixedCatalog = testdb
FixedSchema = dbo
Password = ***
URL = jdbc:jtds:sqlserver://sapserver;database=testdb
UserName = testuser
Why is not connecting to my database?
Solved it on my own!
For who's having the same problem:
The URL should be: jdbc:jtds:sqlserver://sapserver:1433;<b>DatabaseName</b>=testdb
Besides that: the test servlet only uses the default JDBC connection. If you clone it to have connections to other sqlserver databases, these new connections will not appear in the test servlet.
The solution is to manually add these connections to the second test page:
http://<hostname>:<port>/TestJDBC_Web/TestJDBCPage2.jsp?sys_jdbc=<connection_name>;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.