Skip to content
Advertisement

Tag: jdbc

java netbean inserting data to db does not work

I’m trying to insert data to data base by my own interface using java netbean But I’m stuck with insert query doesn’t work here is my code segment st.executeUpdate(query) mark as wrong. Answer Ok, let me explain your problem. You don’t have configured jdbc driver. Don’t need to cast anything! You have question mark ‘?’ In your query, and you

Java JDBC – PreparedStatement executeUpdate() always returns 1

Currently I’m working on a code in java that retrieves data from XML files located in various folders and then uploads the file itself and the data retrieved to a SQL-server Database. I don’t want to upload any repeated XML file to database but since the files can have random names I’m checking using the Hash from each file I’m

“NoClassDefFoundError: javax/xml/bind/DatatypeConverter” with SQL Server JDBC

I recently switched to intellij but I’m finding it hard to connect to my localDB. The same code worked on eclipse fine. Also I have already added the sqljdbc42.jar as a module dependency. Error produced: Any help would be greatly appreciated. I’ve also tried the overloaded DriverManager.getConnection(url, user, pass) method and same error. Answer For Java 9+ compatibility, you need

How to do SQL from Akka?

What is the idiomatic Akka way to issue SQL statements from an Akka application? Specifically, I have an Akka Http REST endpoint that wants to do SQL commands. Is there some official SQL support or async or message passing style SQL library? Answer Answering your specific question, “what is the idiomatic akka way to issue sql”, I would agree with

Can’t insert Cyrillic symbols into MySQL with JDBC

I have a web app which uses com.mysql.jdbc.Driver to connect to MySQL database. Here are jdbcMySQL.properties: I create database like this: And the problem is: if I make then I have in my table BUT, if I make: I have in my table: Answer MySQL is a bit crazy w.r.t. encodings, try: Furthermore there is one more possible error cause:

Advertisement