my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes database connectivity using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "database connectivity using java" Watch "database connectivity using java" New topic

database connectivity using java

bala kan
Ranch Hand

Joined: Aug 20, 2012
Posts: 44
good evening to everyone,

i have been doing java program using JFrame to create registration page.. there are 7 fields such as name, username, password,address,city,dob and gender..

and one JButton object.. when i clicked it, these details should be saved in the database..

i used the following code but it gives me an error like that

error is java.sql.SQLException: Invalid Cursor Type: 1003

my code is

Thanks in advance
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 502

Looks like you need to specify a particular cursor type when creating the statement, ie. forward or backward.
Why don't you use INSERT statement ?

PM Me If You Want to get Urgent Help on Java Programming
Wendy Gibbons

Joined: Oct 21, 2008
Posts: 1107

I really really doubt odbc supports modifiable result sets..

I would just do an old fashioned insert statement using a prepared statement.
I agree. Here's the link:
subject: database connectivity using java
It's not a secret anymore!