NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Connecting to Sql Server 2008

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
ChakrabortyAnshu



Joined: 15 Jan 2010
Posts: 17
Location: mumbai,india

PostPosted: Fri Jan 15, 2010 1:34 pm    Post subject: Connecting to Sql Server 2008 Reply with quote

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

PostPosted: Tue Mar 02, 2010 3:43 pm    Post subject: same problem here Reply with quote

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

PostPosted: Wed Mar 03, 2010 9:04 am    Post subject: Reply with quote

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

PostPosted: Sat Mar 06, 2010 3:25 pm    Post subject: Reply with quote

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

PostPosted: Thu Mar 25, 2010 5:53 am    Post subject: Reply with quote

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

PostPosted: Tue Apr 27, 2010 7:22 am    Post subject: Reply with quote

Guys any luck... Sad. Did you try using JTDS jar .
Back to top
Andreas Ernst
Posted via mailing list.





PostPosted: Tue Apr 27, 2010 5:20 pm    Post subject: Connecting to Sql Server 2008 Reply with quote

Am 27.04.2010 09:22, schrieb ChakrabortyAnshu:
Quote:
Guys any luck... Sad. 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

PostPosted: Tue Apr 27, 2010 11:28 pm    Post subject: Connecting to Sql Server 2008 Reply with quote

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... Sad. 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

PostPosted: Wed Apr 28, 2010 11:02 am    Post subject: Reply with 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. Smile
Back to top
ChakrabortyAnshu



Joined: 15 Jan 2010
Posts: 17
Location: mumbai,india

PostPosted: Wed Apr 28, 2010 12:34 pm    Post subject: Reply with quote

Hey Julian,

I'll try this jar file and let you know.
Back to top
Andreas Ernst
Posted via mailing list.





PostPosted: Wed Apr 28, 2010 3:59 pm    Post subject: Connecting to Sql Server 2008 Reply with quote

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. Smile

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

PostPosted: Fri Apr 30, 2010 7:17 am    Post subject: Reply with quote

All right.

Thank You Andreas
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo