0

I want to create a Entity class with database in Netbeans.

When i select a Data source jdbc/Ionbank (custom Jdbc connection Using JDBC-ODBC bridge with Ms SQL 2005 as database).

I see all the table from that database.
All tables show no primary key, but they have primary keys in them.

I am trying to find out what is problem.

Thing i tried :-
1. Created new 4-5 data source.
2. Created tables using query, and not the New table option.
3. Tried changing Odbc connection.
4. Tried using different drivers for the Jdbc-Odbc bridge like Sql4jdbc.jar, Jdts.jar.


Still No luck. Plz help
I have Attached PrintScreen Image of this No primary key tables.

Attachments No_primary_key.png 296.14 KB
2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by StephNicolaou
0

Actually go/log into the database to see if primary keys are set, show that print screen. When you wrote your queries, you included 'int not null' and primary key(whatever) lines (?).

If then Netbeans is still not showing the primary keys, I would code the database link as it must be the Netbeans settings playing up. I haven't heard about Ionbank so try selecting other data sources to check whether it's happening for each type.

JDBC connection setup
http://www.mkyong.com/jdbc/how-to-connect-to-mysql-with-jdbc-driver-java/

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.