- This topic has 35 replies, 13 voices, and was last updated 17 years, 9 months ago by Haris Peco.
-
AuthorPosts
-
alababiMemberI’m having trouble connecting to the SQL database too, I use MS SQL jtds driver downloaded from http://sourceforge.net, here is the link: http://nchc.dl.sourceforge.net/sourceforge/jtds/jtds-1.2-dist.zip
My SQL Server name: ALA on local machine
I use “sa” as admin user and a blank password, I had also create another user to test but fail,
my connection URL is: jdbc:jtds:sqlserver//:ALA:1434/master
I’ve tried another URL too, but all them failed, hic
jdbc:jtds:sqlserver//:ALA:1434/master
jdbc:jtds:sqlserver//:localhost:1434/master
jdbc:jtds:sqlserver//:ALA:1433/master
jdbc:jtds:sqlserver//:localhost:1433/masterHere is some picture I print the screen ’bout the error:
Haris PecoMemberalababi,
You need a URL of the form jdbc:jtds:sqlserver//:localhost:1434/master or jdbc:jtds:sqlserver//:localhost:1433/master
However, your error means that your database is not listening on port 1434 (or 1433).You have to set this (default is off) using SQL Server Configuration Manager.
You will see nodes Protocols and Protocol TCP/IP – right click on TCP/IP and in the IP Address tab set TCP port to your favored port.Regards,
Peco
alababiMemberThanks Peco, it’s working now, My friend Khoa adviced me to upgrade to SQL 2000 SP4 and it worked.
I have another problem while I use Driver downloaded from http://microsoft.com, here is 3 file I have downloaded: msbase.jar, mssqlserver.jar, msutil.jar
When I tried to connect, it shows this message (I used this connection string: jdbc:sqlserver://localhost:1433 ,I checked, port 1433 is opened, jdbc:microsoft:sqlserver://localhost:1433/master fail as well, hic hic)
Haris PecoMemberalababi,
Could you try Microsoft JDBC driver 2005.It will works with MS SQL 2000 as well.
This is link for download http://msdn2.microsoft.com/en-us/data/aa937724.aspxRegards,
alababiMemberHey, it’s working, thank you Peco, it helped me much. I hate these bugs, it costs me lots times.
Haris PecoMemberalababi,
I’m glad for your success.You are correct, setting databases is complex, because we have to support different databases and installing database servers is out of our control.JDBC driver settings is complicated as well and it is little easier in new specificaton (jdbc 4.0 and jdk 6), but there isn’t drivers for new specification.
Regards,
Peco -
AuthorPosts