| Author |
SQL Server express 2008 jdbc connection problem
|
Pavani Kokkiragadda
Greenhorn
Joined: Jan 19, 2011
Posts: 20
|
|
Hi,
I want to practice jdbc scenario now. For that, I installed SQL Server Express 2008 edition(freeware). I want to develop a desktop database application.
What is connection URL for SQL Server?
How to connect SQL Server to NetBeans?
Please help me!!
-nskp
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
Download the JDBC 3.0 driver. Unpack it; the EXE gets unpacked by executing it. Inside, check for folder enu\help\samples\connections. There are two examples for connecting there.
Or check out their JDBC FAQ; item 11 has a link to a very useful site.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Pavani Kokkiragadda
Greenhorn
Joined: Jan 19, 2011
Posts: 20
|
|
Hi,
I am getting error while creating New Database connection to SQL Server from NetBeans.
Error:
Unable to add connection, cannot establish a connection to jdbc:microsoft:sqlserver://localhost:1433 using com.microsoft.jdbs.sqlserver.SQLServerDriver.Connection refused:connect.
I enabled TCP/IP and set dynamic port to 1433. I also checked firewall too. And My SQL Service is running.
Please suggest me!!
-nskp
Rob Spoor wrote:Download the JDBC 3.0 driver. Unpack it; the EXE gets unpacked by executing it. Inside, check for folder enu\help\samples\connections. There are two examples for connecting there.
Or check out their JDBC FAQ; item 11 has a link to a very useful site.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
And the server is running on the same machine as you're running the code on?
|
 |
Pavani Kokkiragadda
Greenhorn
Joined: Jan 19, 2011
Posts: 20
|
|
Hi, I solved the connection problem by making the Windows Authentication into mixed authentication.
I could create new Connection with 'sa' user.
But now the problem is, it is not showing the tables in the database while creating Desktop project.
What could be the problem?
Please suggest!!
-nskp
Rob Spoor wrote:Download the JDBC 3.0 driver. Unpack it; the EXE gets unpacked by executing it. Inside, check for folder enu\help\samples\connections. There are two examples for connecting there.
Or check out their JDBC FAQ; item 11 has a link to a very useful site.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
How are you trying to retrieve the databases? DatabaseMetaData provides a uniform way to do this, with its getTables method.
|
 |
Pavani Kokkiragadda
Greenhorn
Joined: Jan 19, 2011
Posts: 20
|
|
Hi,
Thank you Rob.
I found the solution myself. It was a silly mistake( did not select the right schema!!).
Now my project is perfectly working!!
-nskp
Rob Spoor wrote:How are you trying to retrieve the databases? DatabaseMetaData provides a uniform way to do this, with its getTables method.
|
 |
 |
|
|
subject: SQL Server express 2008 jdbc connection problem
|
|
|