| | |
creating files with "outfile..." (file can't found!)
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 105
Reputation:
Solved Threads: 0
I did this ..
But I can't find the file that is created!!
When I run the query in WAMP mysql console , it creates the out file in wamp\mysql\data . But not in previous case.
Where is this file created?
Java Syntax (Toggle Plain Text)
String filename = "tempoutfile.txt"; String tablename = "table1"; try{ Connection con = DriverManager.getConnection("jdbc:mysql://localhost/Test","root",""); Statement s=con.createStatement(); ResultSet r=s.executeQuery("SELECT * INTO OUTFILE '"+ filename + "' FROM " + tablename); }catch(SQLException se){System.out.println(se.getMessage());}
But I can't find the file that is created!!
When I run the query in WAMP mysql console , it creates the out file in wamp\mysql\data . But not in previous case.
Where is this file created?
Last edited by jrosh; 23 Days Ago at 1:14 am.
0
#2 23 Days Ago
Add a System.out.println(System.getProperty("user.dir")) in there.
Otherwise use the search function for the OS.
But, the best way is to provide the full path to the file from the beginning. Why simply deal with defaults that can change due to configuration and/or operating parameters when you can control the operation.
Otherwise use the search function for the OS.
But, the best way is to provide the full path to the file from the beginning. Why simply deal with defaults that can change due to configuration and/or operating parameters when you can control the operation.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Similar Threads
- VB6 - dll file not found error 53 (Visual Basic 4 / 5 / 6)
- Rundll32 file not found!! (Viruses, Spyware and other Nasties)
- Rundll32 file not found!! (Viruses, Spyware and other Nasties)
- "Dangerous viruses detected in your system" popup when opening files and folders (Viruses, Spyware and other Nasties)
- Write binary files without "c style" (C++)
- where is "file types"? (Windows Vista and Windows 7)
- "run time error 53" file not found (Visual Basic 4 / 5 / 6)
- Included file not found during compile time. (C++)
Other Threads in the Java Forum
- Previous Thread: scroll text with many link
- Next Thread: Java Software Help
| Thread Tools | Search this Thread |
911 actionlistener addressbook android api append applet application array arrays automation binary blackberry block bluetooth character chat class client code component consumer csv database desktop developmenthelp eclipse error fractal ftp game givemetehcodez graphics gui html ide image integer j2me j2seprojects japplet java javaarraylist javac javaee javaprojects jni jpanel julia lego linked linux list loops mac map method methods mobile netbeans newbie number objects online oriented panel printf problem program programming project projects properties recursion replaydirector reporting researchinmotion rotatetext rsa scanner se server set singleton sms sort sql string swing test textfields threads time title tree tutorial-sample ubuntu update windows working






