Escape MySQL strings in Java… without prepared statements

286
July 24, 2017, at 4:18 PM

I am looking for a way to escape strings for MySQL queries with Java.

But WAIT, before some of you jump straight away to the conclusion of "prepared statements", I wish to explain a little more.

The problem is, I don't have a MySQL connection. I am not executing any MySQL queries directly from Java. I don't know much about prepared statement, but AFAIK, prepared statements need a live connection to work.

I want to my code to read in a bunch of CSV/XLS files, get the data and then generate a huge INSERT query for MySQL. BUT this query will be stored in a text file for now. It won't execute just yet until someone gives the green light and dump this text file into the database.

Is there an easy way to do so without employing an overkill framework/library? Thank you all.

Rent Charter Buses Company
READ ALSO
Update Query in laravel 5.4

Update Query in laravel 5.4

How can I update multiple rows

386
Mysql in Erlang

Mysql in Erlang

I want get data in Mysql by Erlang but the data output I get it show all col_name and it not render one by one

381
C# Keyword not supportet - CertificateFile - MySqlConnection

C# Keyword not supportet - CertificateFile - MySqlConnection

I am trying to establish a SSL connection to a MySQL Server

345
Update command timeout to 0 in mysql db configuration

Update command timeout to 0 in mysql db configuration

How to update the command timeout in mysql databaseI know how to do it at application level but I want to change the command timeout at db end

300