Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / July 2004

Tip: Looking for answers? Try searching our database.

Java and SQL Server

Thread view: 
grdzeli_kaci - 08 Jul 2004 08:45 GMT
when i was working in windows 2000 (2000 Advanced Server,windows XP,9x
i wrote program which used DB (Microsoft SQL Server 2000) but yestarda
i was installed Windows 2003 Server my program is not working ........

it's throws Exception ........ :

java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Erro
establishing socket.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknow
Source)

here is my connection's source code
Code:
public  Connection GetXAConnection(String _ServarName,Strin
_DataBaseName,int _Port,String _UID,String _Pssword) throws Exception
{

try
{
SQLServerDataSource ds = new SQLServerDataSource();
ds.setDataSourceName("SQLServer");
ds.setServerName(_ServarName);
ds.setDatabaseName(_DataBaseName);
ds.setPortNumber(_Port);
ds.setSelectMethod("cursor");
return ds.getConnection(_UID, _Pssword);
}
catch (SQLException ex)
{
ex.printStackTrace();
throw ex;
}
}

i don't know english very well and please sorry about it .......

please help me ............................
-
grdzeli_kac
-----------------------------------------------------------------------
Daniel Hagen - 09 Jul 2004 10:40 GMT
> when i was working in windows 2000 (2000 Advanced Server,windows XP,9x)
> i wrote program which used DB (Microsoft SQL Server 2000) but yestarday
[quoted text clipped - 6 lines]
> at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown
> Source)

Use netstat on the server to determine wether anyone is listening on the
SQL Server TCP port (usually 1433).

You propably did not install SQL Server Service Pack 3.
On Windows 2003 Server TCP/IP is disabled for SQL Server without SP 3
due to security issues. Look at the eventlog, you will propably find a
message stating something in that direction.

Install SQL Server Service Pack 3 on the server, reboot and you should
be fine.

Daniel Hagen


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.