Win a copy of JDBC Workbook this week in the JDBC and Relational Databases forum
or A Day in Code in the A Day in Code forum!

rand Kirby

Greenhorn
+ Follow
since May 24, 2017
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by rand Kirby

So, im trying to add information to a table names users in a database. When I run this code I get the error "Can not issue data manipulation statements with executeQuery()". Should I be using a different statement? The con is already initialized and created in a different class called DBConnect. Thanks in advance!

This is DBConnect

[/code]
I am trying to execute a query statement from my java program, but whenever I run it I get a nullpointerexeption on the Statement stmt = DBConnect.con.createStatement();. Does anyone know how to fix this?

I am trying to execute a query statement from my java program, but whenever I run it I get a nullpointerexeption on the Statement stmt = DBConnect.con.createStatement();. Does anyone know how to fix this?

3 years ago