| | |
creating files with "outfile..." (file can't found!)
Thread Solved |
•
•
Join Date: Sep 2009
Posts: 102
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; 20 Days Ago at 1:14 am.
0
#2 20 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 addball addressbook android api append applet application apps array arrays automation binary bluetooth businessintelligence button card class client code collision component crashcourse css csv database eclipse ee error fractal free ftp game gis givemetehcodez graphics gui html ide image integer integration j2me japplet java javaarraylist javadoc javafx javaprojects jni jpanel julia jvm linked linux list loan machine map method methods migrate mobile netbeans objects oriented output phone physics printf problem program programming project projects radio recursion replaydirector reporting researchinmotion rotatetext scanner se server service set sms software sort sql string swing test textfield threads tree trolltech ubuntu utility windows






