<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7226.0">
<TITLE>Importing data in MySQL via OpenCMS</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I have got a tab delimited text file which I want to upload it into a MySQL table via opencms.</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">The text file is uploaded to a folder in OpenCMS </FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">When it try to execute the code I am getting an error that the file is not found and if I try to upload the file from my local drive I get the following error</FONT></P>
<P><FONT SIZE=2 FACE="Arial">java.sql.SQLException: Can not issue INSERT/UPDATE/DELETE with executeQuery() </FONT>
<BR><FONT SIZE=2 FACE="Arial">I am using a instance of the Statement object to execute the query and query is </FONT>
<BR><FONT SIZE=2 FACE="Arial">"LOAD DATA LOCAL INFILE " + '"' + strFilePath + '"' + " INTO TABLE `productmaster`"</FONT>
<BR><FONT SIZE=2 FACE="Arial">Any ideas / tips / sample code to upload a file into a table via OpenCMS is welcome</FONT>
<BR><FONT SIZE=2 FACE="Arial">Regards,</FONT>
<BR><FONT SIZE=2 FACE="Arial">Oliver</FONT>
</P>
</BODY>
</HTML>