| View previous topic :: View next topic |
| Author |
Message |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Fri Jan 15, 2010 1:34 pm Post subject: Connecting to Sql Server 2008 |
|
|
Hi,
Currently i am using netbeans 6.8 and Windows vista (operating system).
I was able to Connect to the SQL server using Service section (JDBC-ODBC Bridge) connecting to a DNS. and was able to get successful results to the queries fired.
But when i am trying to create a new Database project it is not allowing me to Connect to any of the table and throws error as "Connected Database contains only tables without primary keys."
Please help |
|
| Back to top |
|
 |
bskrbec
Joined: 02 Mar 2010 Posts: 2
|
Posted: Tue Mar 02, 2010 3:43 pm Post subject: same problem here |
|
|
I'm getting the same error message. Database is a SQL Server 2005 instance, and these tables are definitely indexed, so the message really doesn't make any sense. I'm connecting via ODBC/JDBC
Any insight as to why Netbeans thinks otherwise? |
|
| Back to top |
|
 |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Wed Mar 03, 2010 9:04 am Post subject: |
|
|
hey,
Still not been able to find any solution.
Currently using my connectivity through jtds-1.2.
This is good too. But it would be better if we could find some way out for Netbeans connectivity.
By the way Indexing is required for faster data access in a table.
But error is totally different.
it says most of the tables doesn't contain primay keys which is not at all true. |
|
| Back to top |
|
 |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Sat Mar 06, 2010 3:25 pm Post subject: |
|
|
Hi brickshaw,
Thanks for your concern..
Guys,
I am sure more people must have gone through the same (may be in previous netbeans versions).
If anybody has solution to this please help. |
|
| Back to top |
|
 |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Thu Mar 25, 2010 5:53 am Post subject: |
|
|
Guys,
I used jtds-1.2.jar Driver for Connection..
It was better than conventional Connection.
You guys also try this out...
Its better but still doesn't meet to our satisfaction. |
|
| Back to top |
|
 |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Tue Apr 27, 2010 7:22 am Post subject: |
|
|
Guys any luck... . Did you try using JTDS jar . |
|
| Back to top |
|
 |
Andreas Ernst Posted via mailing list.
|
Posted: Tue Apr 27, 2010 5:20 pm Post subject: Connecting to Sql Server 2008 |
|
|
Am 27.04.2010 09:22, schrieb ChakrabortyAnshu:
| Quote: | Guys any luck... . Did you try using JTDS jar .
|
i found in my jar dir:
sqljdbc.jar
sqljdbc4.jar
these are pure java and no ODBC bridge.
iirc, there a some prerequisite to connect with java.
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
address-removed | www.ae-online.de
www.parcelchecker.de | www.tachyon-online.de |
|
| Back to top |
|
 |
julsorio
Joined: 05 Jun 2009 Posts: 168 Location: Bogota, Colombia, South America
|
Posted: Tue Apr 27, 2010 11:28 pm Post subject: Connecting to Sql Server 2008 |
|
|
On 27 April 2010 12:18, Andreas Ernst <address-removed ([email]address-removed[/email])> wrote:
| Quote: | Am 27.04.2010 09:22, schrieb ChakrabortyAnshu:
| Quote: | Guys any luck... . Did you try using JTDS jar .
|
i found in my jar dir:
sqljdbc.jar
sqljdbc4.jar
these are pure java and no ODBC bridge.
iirc, there a some prerequisite to connect with java.
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
address-removed ([email]address-removed[/email]) | www.ae-online.de
www.parcelchecker.de | www.tachyon-online.de
|
Try this using the sqljdbc4.jar
http://paste-it.net/public/c9c44a7/
--
Julian Osorio Amaya
Ingenier |
|
| Back to top |
|
 |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Wed Apr 28, 2010 11:02 am Post subject: |
|
|
Hi Andreas,
If we implement jar files in the code it works. But i was trying something shown in below links using Microsoft SQL Server Database.
http://netbeans.org/kb/docs/java/gui-db.html
I tried the same method defined in the tutorial and was successful.
Unfortunately while implementing it into GUI using MICROSOFT SQL SERVER it is not allowing me to Connect to any of the table and throws error as "Connected Database contains only tables without primary keys."
which is not at all true.  |
|
| Back to top |
|
 |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Wed Apr 28, 2010 12:34 pm Post subject: |
|
|
Hey Julian,
I'll try this jar file and let you know. |
|
| Back to top |
|
 |
Andreas Ernst Posted via mailing list.
|
Posted: Wed Apr 28, 2010 3:59 pm Post subject: Connecting to Sql Server 2008 |
|
|
Am 28.04.2010 13:03, schrieb ChakrabortyAnshu:
| Quote: | Hi Andreas,
If we implement jar files in the code it works. But i was trying something shown in below links using Microsoft SQL Server Database.
http://netbeans.org/kb/docs/java/gui-db.html
I tried the same method defined in the tutorial and was successful.
Unfortunately while implementing it into GUI using MICROSOFT SQL SERVER it is not allowing me to Connect to any of the table and throws error as "Connected Database contains only tables without primary keys."
which is not at all true.
|
This example use Java Persistence API (JPA), therefor you need primary
keys in your database. So, this isn't an issue connecting to the database.
2 options:
- create primary keys
- use a JDBC connection
--
ae | Andreas Ernst | IT Spektrum
Postfach 5, 65612 Beselich
Schupbacher Str. 32, 65614 Beselich, Germany
Tel: +49-6484-91002 Fax: +49-6484-91003
address-removed | www.ae-online.de
www.parcelchecker.de | www.tachyon-online.de |
|
| Back to top |
|
 |
ChakrabortyAnshu
Joined: 15 Jan 2010 Posts: 17 Location: mumbai,india
|
Posted: Fri Apr 30, 2010 7:17 am Post subject: |
|
|
All right.
Thank You Andreas |
|
| Back to top |
|
 |
|