Close
jGuru Forums
Posted By: Daxin_Zuo Posted On: Wednesday, April 28, 2004 10:00 AM
It is my first question. Please forward instruction. We ordered the Jbuilder X enterprise 9. Currently, I am using the enterprise try version on windows 2000. I set the Enterprise setup, created a MSSQLServer. In database pilot, I set at view/options and created a new database new URL The driver and URL I used are: com.microsoft.jdbc.sqlserver.SQLServerDriver jdbc:microsoft:sqlserver://myName:1433:databaseName=pubs in RUN/Configures, I set the library with MSSQLServer (only specified this as lib). In my program, I have Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver"); con = DriverManager.getConnection("jdbc:microsoft:sqlserver://myName:1433:databaseName=pubs","user1","user1"); When I compile and run my program with JBuilder, I get error: [Microsoft][SQLServer 2000 Driver for JDBC]Unable to connect. Invalid URL. My program is correct. I can compile and run it from command line with J2SE 1.4 What's wrong with my Jbuilder configuration? Please. Thank you.
Re: URL error in connection with MS SQL server 2000 (sp4) JDBC driver (sp2)
Posted By: Sven_Schneider Posted On: Monday, May 17, 2004 02:49 AM
Posted By: Benjamin_Toso Posted On: Monday, May 10, 2004 10:32 AM
By the way, we found very quickly that Microsoft's JDBC driver is an outdated implementation that does not support the newer JDBC features. I would not use it in any production environment. We use Merlia
Posted By: Benjamin_Toso Posted On: Monday, May 10, 2004 10:27 AM
The URL must be exactly what the driver expects. The example in the docs shows this: con = DriverManager.getConnection("jdbc:microsoft:sqlserver://server1:1433;User=test;Password=secret"); For your specific setup I might try: con = DriverManager.getConnection("jdbc:microsoft:sqlserver://server1:1433;DatabaseName=pubs;User=user1;Password=whateverpassword"); Also make sure the the SQL Server client is setup to use TCP/IP on port 1433 for that particular server.