| | |
creating files with "outfile..." (file can't found!)
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 101
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; 18 Days Ago at 1:14 am.
0
#2 18 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 |
android api applet application apps array arrays automation awt bidirectional binary birt bluetooth businessintelligence busy_handler(null) card class classes client code collision columns component constructor crashcourse database designadrawingapplicationusingjavajslider draw eclipse error errors eventlistener exception expand fractal game givemetehcodez graphics gui guidancer html ide image inetaddress integer intellij j2me java javadoc javafx javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia linux list loop machine map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle physics plazmic print problem program project radio recursion scanner server set sharepoint smart sms smsspam sort sortedmaps sql string subclass support swing textfield threads tree trolltech unlimited utility webservices windows






