Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 JDBC connection help

Author  Topic 

nishy45
Starting Member

3 Posts

Posted - 2005-11-23 : 13:13:29

I have installed SQL Server 2000 on windows xp pro.
I installed MSDE first and then the SQL Server 2000.
First I use this in my java code
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

when i use the following line to make a jdbc connection, I get an error

Connection conn= DriverManager.getConnection("jdbc:odbc:nishant1","sa","");

would be very helpful if someone could clarify the following
1. i hope the driver comes with sql server 2000
2. do i have to set something in the classpath
3.is there some thing else i might have overlooked.

* during installation it told me, I could only install client tools. i went ahead and installed anyway

thanks a lot for any kind of help. I am really in a soup !!!
Nishant

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2005-11-23 : 14:55:34
If you only installing client tools, then where is your database server? You can't connect to client tools. You have to connect to a server installation of SQL Server.


Tara Kizer
aka tduggan
Go to Top of Page

nishy45
Starting Member

3 Posts

Posted - 2005-11-23 : 23:13:31

I see. But I am able to create tables, insert ,delete and update them. And the bottom right of the desktop screen has the icon which shows that SQL server 2000 is running. IT gives me the option to start, stop and pause the server.

so I was assuming that the database server is installed, even though during installation it told me that only client tools can be installed.

can anyone guide me, how can i make a jdbc connection to the tables i created in the database.

Nishant
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2005-11-23 : 23:25:24
>>can anyone guide me, how can i make a jdbc connection to the tables i created in the database.

See if this helps you
www.ConnectionStrings.com

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

nishy45
Starting Member

3 Posts

Posted - 2005-11-24 : 02:22:56

That link didnt help too much. But thanks for the info. is there anything else that i can do.

thanks

nishant
Go to Top of Page
   

- Advertisement -