文本文件数据插入数据库
问题描述:
嗨专家
i有小疑问
如何将文本文件数据插入数据库
hi experts
i have small doubt
how to inserte text file data into database
答
步骤1)做一点研究。 Google是一个很好的起点
ie
http ://www.roseindia.net/tutorial/java/io/insertFileData.html [ ^ ]
或
http://www.java2s.com/Code/Java/Database-SQL-JDBC/InserttextfileintoMySQL.htm [ ^ ]
http://www.java2s.com/Code/Java/Database-SQL-JDBC/InsertTextFileToOracle.htm [ ^ ]
与其他数据库的最后两个链接的主菜单s或型号:
http:// www.java2s.com/Code/Java/Database-SQL-JDBC/CatalogDatabase-SQL-JDBC.htm [ ^ ]
步骤2)开始编码
步骤3)编译并使用调试解决小问题
步骤4)当你遇到问题时你不知道如何解决但至少你试过了,然后回来问一些具体的代码片段给出问题
对不起,如果这不是你想要的答案。但你的问题有点太宽,无法在快速答案中得到解答。如果你对具体问题提出10个具体问题,那就更好了,你得到更快的帮助,而不是关于如何引导的大问题
Step 1) Do a little research. Google is a good start point
i.e.
http://www.roseindia.net/tutorial/java/io/insertFileData.html[^]
or
http://www.java2s.com/Code/Java/Database-SQL-JDBC/InserttextfileintoMySQL.htm[^]
http://www.java2s.com/Code/Java/Database-SQL-JDBC/InsertTextFileToOracle.htm[^]
Main menu for last two links with other databases or models:
http://www.java2s.com/Code/Java/Database-SQL-JDBC/CatalogDatabase-SQL-JDBC.htm[^]
Step 2) Start coding
Step 3) Compile and use the debug to solve little issues
Step 4) When you get a problem you don't know how to solve but at least you tried it, then come back and ask for something concrete with a snippet of the code giving problems
Sorry if this is not the answer you were looking for. But your question is a bit too wide to be answered at the "Quick" Answers. It is better and you get faster help if you make 10 concrete questions about concrete problems, than a big question about a "how-to guide"
你基本上有两个选择:
You have basically two options:
- Store the text file content in the database ( Google[^] is you friend).
- 将文件路径存储在数据库中并保留文本文件文件系统。