yeaaaaahhhhhhhh hhhhhh........
Hai r035198x....
i found the solution for that....
just we have add a LOCAL keyword in the query like this
stmt.executeUpd ate("LOAD DATA LOCAL INFILE \"" + filename + "\" INTO TABLE " + tablename + " FIELDS TERMINATED BY ','");
Now itz perfectly working...
Thanks for replying...
se...
User Profile
Collapse
-
Now also the same result....
i will explain u clearly..
When i want a export data from a database into a text file..
i used the query, SELECT * INTO OUTFILE 'C:/test.txt' FROM TABLE....
there is no test.txt file in C:/..i cant see it...
But when i run the program again, it throwing an exception that
C:/test.txt already exists....
thats what, i came...Leave a comment:
-
Now also the same result....
i will explain u clearly..
When i want a export data from a database into a text file..
i used the query, SELECT * INTO OUTFILE 'C:/test.txt' FROM TABLE....
there is no test.txt file in C:/..i cant see it...
But when i run the program again, it throwing an exception that
C:/test.txt already exists....
thats what, i came...Leave a comment:
-
Ya it is creating a file..... But it is not storing in c:/
i dont know where it is storing......
the file is storing in some other location...
the file is in invisible mode.......Leave a comment:
-
Ya it is creating a file..... But it is not storing in c:/
i dont know where it is storing......
the file is storing in some other location...
the file is in invisible mode.......Leave a comment:
-
Hey another one things...
But when i tried the filename = "C:/test.txt"
itz import the data from the database and load it to the text file perfectly..
but whatz special in this is.... there is no test.txt file in the C:/
Actually test.txt file is a created file by using Query
SELECT * INTO OUTFILE in the java program for export data to a file(C:/test.txt)..
...Leave a comment:
-
Hey another one things...
But when i tried the filename = "C:/test.txt"
itz import the data from the database and load it to the text file perfectly..
but whatz special in this is.... there is no test.txt file in the C:/
Actually test.txt file is a created file by using Query
SELECT * INTO OUTFILE in the java program for export data to a file(C:/test.txt)..
...Leave a comment:
-
LOAD DATA INFILE problem....
Hi guys,
I have got a question regarding LOAD DATA INFILE. Can some one save my day.
1. I want to import a txt file into mysql database.
when I use the following query in the mysql> prompt its fine.
which is
when I do it java I am getting error
Error
-----------
java.sql.sqlExc eption: General error message from server:
"File 'D:/Sen.txt' not found... -
LOAD DATA INFILE problem....
Hi guys,
I have got a question regarding LOAD DATA INFILE. Can some one save my day.
1. I want to import a txt file into mysql database.
when I use the following query in the mysql> prompt its fine.
which is
when I do it java I am getting error
Error
-----------
java.sql.sqlExc eption: General error message from server:
"File 'D:/Sen.txt' not found... -
asenthil replied to How to retrive all the rows in a mysql database and write it to a file using java?in Javaya okay,
now itz cleared...
thanks for ur support and responses...
senthil.Leave a comment:
-
asenthil replied to How to retrive all the rows in a mysql database and write it to a file using java?in JavaYa i'm also want the reason for hirak's question...
plzz explain us.. r035198x....
thanks.
senthil.Leave a comment:
-
asenthil replied to How to retrive all the rows in a mysql database and write it to a file using java?in JavaHai r035198x...
Very very thanks for ur reply...
Now itz working perfectly...
i'm a beginner to java, jsp...
Now i'm learning hardly to work in java...
can u plzz tell me...
what are the main concepts i have to study in java
to do projects in jsp...
thanks
senthil.Leave a comment:
-
asenthil replied to How to retrive all the rows in a mysql database and write it to a file using java?in JavaHai ro35...
thanks for ur reply...
now its writing the data to the file...
But itz not writing the Employee_Number to the file...
the output is like the follwing in the text file..
? Axel Washington
? Arvid Sharma
? Jonas Ginsberg
? Florence Wojokowski
? Sean Washington
?Elizabeth Yamaguchi
its sucessfully writing the two strings...Leave a comment:
-
asenthil started a topic How to retrive all the rows in a mysql database and write it to a file using java?in JavaHow to retrive all the rows in a mysql database and write it to a file using java?
Hai to all,,
i had to tried to retrive and write a single row to a file from the database..
But dont know to write all the retrived rows to a file from the database..
how to do that...
here are my codings for writing a single row to a file...
...Code:import java.io.*; import java.sql.*; public class DataBase { public static void main(String args[]) -
Exception: Can not issue SELECT via executeUpdate!
Hai to all,
Now i'm trying to export Mysql table to a file By using the
following program...
itz sucessfully compiled... but it throws the above Exception..
[HTML]...Code:import java.io.*; import java.sql.*; public class ExportData { public static void main(String args[]) { String Driver; Statement stmt; ResultSet rs; -
How to export table data from a mysql database into text file using java?
Hai,
i'm a beginner to java...
just now i had tried to read and write files using java...
and then i had tried to connect a database using jdbc...
now i want to export the data's from a database into a text file
using java....
Can any one plzz give me an idea for doing this process...
thanks and regards..
senthil. -
How to read and write files using java?
i'm trying to read and write files using java...
some errors occurs when i'm trying this code..
Error in java: Cannot find symbol
location: class java.io.FileOut putStream
FileOutputStrea m fout = new FileOutputStrea m(outputFile);
^
...Code:import java.io.*; public class Copy { public static void main(String[] args) throws IOException -
Beginner to java - HELP!
Hai to all,
i had just now started studying java...
Can anyone plzz tell me..
is there any free e-books available for studying, java programming basics..
Plzz tell me which websites will be used for studying java programming.
senthil -
Hai snow...
As u said i had tried the following method...
...Code:HANDLE hFile,hFile1; DWORD wmWritten; HFILE op,op1; OFSTRUCT ofs; memset(&ofs, 0, sizeof(OFSTRUCT)); op=OpenFile("C:\\tab.doc",&ofs,OF_READ); hFile = CreateFile(_T("C:\\text.doc"),GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);Leave a comment:
-
Hai,
thanks for ur reply...
ya i saw it...
But i cant undestand the explanation for the 2nd parameter...
will u plzz help me...
thanks..
senthilLeave a comment:
No activity results to display
Show More
Leave a comment: