file 2 « file « Java Database Q&A





1. Regarding file and database system    coderanch.com

Hi, welcome to the ranch! A neat idea in design is to defer any decision as long as possible. If you build a whole system that hasn't decided between files or databases, you likely won't build any dependency on files or databases. So far I have no idea what you need to store, so I'm making stuff up. But imagine an ...

2. Writing CSV File from Database Generates Null Pointer    coderanch.com

Hi everyone. I am using the code below to write the contents of a SQL database to a CSV file. However, every time I run it, regardless of the database content, I get a null pointer error somewhere in a record in the 800s range (and the file write stops). Since it produces the same error with different data, I'm pretty ...

3. need help in parsing a file and sending the data to the database    coderanch.com

hi i need help in parsing a file and sending the data to the database. here i am putting the an example file. file. ChainOfComAuthors: CN=David OtherReaders: CN=Mike Standard_7: Criteria_7: Standard_8: Criteria_8: PositionNumber_Super: 47034 CL_Title_Super: Supervising Professional Engineer cl_title: Engineer III SaveOptions: 1 NewDoc: yes FiscalYear: 2000-2001 Standard_1: Employee maintains a thorough. Employee maintains and enhances technical Criteria_1: Employee's work product ...

4. what is dsn?user dsn?system dsn?file dsn?    coderanch.com

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver") will load the class JdbcOdbcDriver if it finds it on the classpath. The dsn is one of two things: 1) It is the ODBC name of the database. That is, the name you defined when you set the database up in odbc. jdbcdbc:OdbcName 2) The actual URL of the database, specifying the server ip address, the port number, and the ...

5. How to use text files as database    coderanch.com

Hi , Can we use text files as database? If so how do we set up datasourse , and how do we get connection where they will be stored? Assume that I am using WebLogic 5.1. I know that WL5.1 comes with Cloudspace. How to set up this one if any one knows it! Thanks for your help Gopi

6. file,system,user dsn    coderanch.com

File DSN's are for connecting to files as datasources. For example, an ASCII text file. System DSN's are available to all users of a given system and can point to a variety of data sources. User DSN's are available only to specific users and can point to a variety of data sources.

7. How to use File DSN in JDBC    coderanch.com

8. Searching for a Record from a EBCDIC File ??    coderanch.com

I used to work on mainframes, but I need more information. Is it a flat file? Is it still on the IBM or is it now on a unix or windows platform? What are you using to do your search? Usually if you move it from an IBM mainframe to a unix box you run it through a ebcdic/ascii conversion. Dan ...





10. initialize database from properties file    coderanch.com

I am having problems writing a servlet to populate a database with values taken from a properties file (a simple text file). I have no problems when the properties file looks like this: x=1 y=2 I can simple use String x = properties.getString("x"); and then enter x into an sql query. However, I need to populate the database from a property ...

11. getBoolean and boolean values in CSV file    coderanch.com

Good Day, I am trying to find out which character equates to a boolean true value. I have found out that `K` `F` `0` equates to false but for some reason `T` `1` `Y` or `S` do not equate to true. If also tried `TRUE` `true` `True` `-1` and the rest of the alphabet. I am using the ODBC driver for ...

12. Parsing data from an Excel file    coderanch.com

13. Reading a Data Range from an excel file    coderanch.com

14. Storing files in RDBMS    coderanch.com

Hi, This may be a basic question. Is there any way to store files as a whole in databases? Or can I just store the information stored in the files? I've got MySQL running and I want to implement a simple message board using servlets. I figured I could save each message as an html file and then store it in ...

15. properties file    coderanch.com

hi i am writing a servlet which access a database using properties file.the error is it is not able to find the properties file. so could u please tell me where should i keep the properties file iam using jbuilder. when i gave completepath like c:\..\...it is giving error null pointer exception.





17. Getting Data in the form of CSV files    coderanch.com

Hello All, My application is supposed to receive data in the form of CSV files and I need to break the files , perform certain validations on the received data ( both data level and DBase level validations) , store the valid data & return back the error data . Performance is an issue here . I was thinking of implementing ...

18. reading DIRECTLY into a excel file    coderanch.com

Originally posted by Pi Pomel: hi, I'm new to this board. hope this hasn't been asked before. how can I read into an excel file directly from java? I know about the ODBC-JDBC bridge thing, but I would like to know if creating the ODBC data source (with the odbc administrator in the control panel) is feasible directly from java (i.e. ...

19. How to access dbase(dbf) files in java?    coderanch.com

I am new to java (less than 6 months). I have existing data in the dbaseIII format (.dbf). I would like to access this using java. This/these dbf file resides on my local PC. I do not need to go to a "server" to get the data. Can someone be kind enough to describe the steps needed and possibly some lines ...

20. JDBC with flat file    coderanch.com

21. DB on Local Files System    coderanch.com

Hi, I am just starting with JDBC (trying to learn) and am not in a situation where my DB cannot be on a server, so I have it stored on my local files system. Will it be accessed the same way? Or where do I need to start? Any information would be greatly appreciated. Restatement - How do I make the ...

22. open file    coderanch.com

24. Column Name for .csv File    coderanch.com

26. Run A batch file    coderanch.com

27. How to create New Excel File    coderanch.com

28. unable to load files    coderanch.com

29. Where to put jdbc jar files    coderanch.com

I already have it working under Tomcat (I put the jdbc driver jar file in "jakarta\lib"). My problem is that I'm trying to write an "application". I've since found that I can make it work by using the "-classpath" option when using the "java" command to run the program. I had read that if you place the jar files into "jdk\jre\lib\ext", ...

30. How to open .jar file    coderanch.com

The (easiest) answer to your question is that a jar file is actually a zip file that has a jar extension. Rename the file to *.zip then open it in WinZip. The correct answer, however, is that you don't open the jar. A jar is a "Java Archive", to use it you either put it on your classpath or in the ...

31. What library file is missing?    coderanch.com

I have installed tomacat to set up Oracle JDBC-ODBC driver,data source... but ran into some problmes: The database connection with Oracle only works with .java files but does not work with jsp files. For example: test.java would work but test.jsp would not. This is the error message I got when running with test.jsp: "OCI.DLL: One of the library files needed to ...

33. Data Access Class Reading a Text File????    coderanch.com

Hi, I have created a data access class... and for one of my constructors.. I need to go a text file and get the information : dsn name, username, and password from the file and bring it into the construtor... does anyone know how to do that?? Thx Rich Here is my constructor: public DataAccess() { }

35. Using File DSN    coderanch.com

36. mysqlDriver.jar inside a JAR file    coderanch.com

39. urgent problem with webobjects and downloading files    coderanch.com

Hi All During working with the Oracle bank our research team came up with questions . Please send me any information or procedure steps regarding these topics so that I could have a more effective use of Oracle8i 1. The bank I am using is the Oracle 8i bank with an interface of Web object 4,5. All of the bank data ...

40. How do I access/modify .dbf files?    coderanch.com

I hope this is the right category for this, if not, please move it to the right place. I need to access and modify .dbf files in order to create the necessary information for input to a mapping package called GeoTools. I found a package called xBaseJ that can do it, but it costs money. Is there anything free that can ...

41. How can I Read a XML file? Please Help me    coderanch.com

Hi Friends, My task is to read an XML file in J2EE environment. Then send the data into a database. I was told that we may have to use one of the parsers. If somebody has got a sample code, please let me know. The code can be on any of the following scenarios. Scenario1: Create a Javabean(XML_To_Oracle) in J2EE that ...

42. Reading XML Files from the IFS    coderanch.com

43. JDBC AND STORING IMAGES/AUDIO/VIEDEO FILES    coderanch.com

Hi all, Can some one help me on how to store Binary files(images/audio/viedeo ) files into Oracle9i database from a Java application.I am developing an Asset management system which can create a catalog of above data.Also I shd be able to retrieve them as per a query. I am using Swing interface at the front end. Any help will be highly ...

45. text files search    coderanch.com

Hello, I need an advise on searching text files. I have a database that searches retailer listings, each retailer has a description about him in a text file. I need a way of searching this text file. I thought about putting the description in the database as one of the fields of the table, but I probably will use MS Access, ...

46. Java Manipulation of CSV files    coderanch.com

47. Text File Manipulation    coderanch.com

49. File based database management system    coderanch.com

Hi all, I am writing an application which requires complex data to be stored. But I want it to store in flat files. Does anybody know any file based database management system that will allow me to store data in flat files but can also provide modern database management functions. I really appreciate all your help. Thanks

50. how to protect password in java file    coderanch.com

51. How can I access database files with out DSN?    coderanch.com

Originally posted by Arnold Kesselaar: HI Guys, I have a somewhat simmilar problem. I want to write a program that has its own little database that it can access when it wishes. I do not know the operating system of the user. The user shouldn't have to register drivers or anything. How can I do this?

53. Reading COBOL ISAM files with java`?    coderanch.com

Hello everyone, I'm new to the site, and have a potentially difficult question...: How can I read a COBOL ISAM file using Java? I need to access a COBOL ISAM file to obtain stock level corresponding to a given product number.. this stock level is then used to update a MySQL database. I have tried searching the web for help on ...

54. saving zip file to database problem    coderanch.com

55. How to convert Resuletset to a PDF file    coderanch.com

56. XML, flat files to database    coderanch.com

Hi all, I am trying to insert from a CSV file, a tabbed file and if possible an xml file into the database. The solution has to be java only and independent of the database (we are porting from sqlserver to db2). So, are there any free java based utilities which insert the given flat file's data into the database? I ...

57. Creating a flat file    coderanch.com

59. MDB file creation    coderanch.com

Forgetaboutit. MS simply chooses not to allow this. The best way is probably to create a visual Basic program and use JNI to connect to it. In essence creating a new driver. The tables are easy though once you have a datasource or database file. Its creating the file thats impossible. Alternatly I found this info somewhere I cant remember There ...

60. importing txt file???    coderanch.com

hello, i am struggling a bit here, java is not my strength, and i am trying to import a .txt into my SQL db. its a bit difficult to explain...hmmm the txt file are orders from a sales rep. and i need to add the details to the relevant tables....and then show a summary of that .txt if any1 can help ...

61. Copy record in the same file.    coderanch.com

Originally posted by Bruce Jin: I need to use 1 record in a file to create another record in the same file. The new record has the same column values except 1 or 2 columns. Is there a simple way to do this? I try to avoid reading every column to parse a INSERT string? Thanks. The only solution that I ...

62. Upload file and store it in database    coderanch.com

There are 2 ways to do that 1 - Store the path of the file in Database and then display the image using that path. It will be efficient and your database size will reasonably reduce. 2 - Store the actual image in database in the form of bytes and then read those bytes and make a file and then display ...

64. Create XML file by using data in Access    coderanch.com

65. Keyed file still produces fifo results    coderanch.com

Just a tiny addition to Dmitry's great answer: Originally posted by Ray Marsh: Do I have to specify an "order by" clause? If you want results in a specific order, you have to ask for it. Full stop. If you don't specify an "order by", the database optimiser is free to execute the query in whatever way it likes, and return ...

66. read from tnsnames.ora file    coderanch.com

Hi , Thanks for replying I am using apache tomcat 5.0.24. I am using driver jdbc : oracle:thin @ server : port:sid,username,password I want the thin driver to read from tnsnames.ora file To do that the above driver would become jdbc : oracle:thin@hostString,password where hostString is taken from tnsnames.ora file But this give me an Io Exception :So Exception was generated. ...

67. save the data import as a Excel File    coderanch.com

68. calling batch files    coderanch.com

69. Creating dsn files    coderanch.com

70. Where Can I Find the classes12.zip File    coderanch.com

from www.oracle.com select Downloads.. From there under "Technologies, Utilities, and Drivers" select Oracle JDBC Drivers. You mentioned oracle 10, so select Oracle Database 10g (10.1.0.2.0) drivers, agree to the license conditions, then the following displays. So, the answer to your question is that there is still classes12.jar for use with JDK 1.2 and 1.3, but it's called ojdbc14.jar for JDK 1.4 ...

71. access file dsn on server from a client    coderanch.com

72. Any datatype to store files of size greater than 20k    coderanch.com

Hi Iam having 2 fields in my table to store files. BLOB can insert files of size < 4k and update files of size <2k. CLOB can do both insert and update of files <4k. LONG RAW datatype is not suporting 2 fields in the same table...Any ideas as how to implement a datatype for 2 fields where i can store ...

73. batch files in JDBC    coderanch.com

74. How to read DBF files through JAVA    coderanch.com

75. Database vs file    coderanch.com

Hi guys I need to save a counter that can be updated (quite frequently) from many different servlets, i cannot let the data it holds get lost in case tomcat is shut down, so the only two options i see for that are saving the counter in a database (MySQL) or in a text file. My question is as far as ...

76. Problem in reading a multilengual XML file into database    coderanch.com

Hi Its two days which im in fight with a severe problem in XML/JAVA/JDBC arena I have an XML file its a glossary which has some thousands of difinition. each difinition is a word with two parts , one of this parts is hebrew and the other is english . (hebrew is explanation of english term). The XML file is unicode ...

77. Wanted: fast and free (file) database    coderanch.com

Hi, I'm looking for a fast & free persistency mechanism for Java on Windows/Unix such as a local (file) database. There should be: - no license for development / usage - no process communication overhead involved, i.e. the sw should run in the same JVM - caching The database is for storage and retrieval of small entries (~100 bytes). The maximum ...

78. File Transfer DB Help!    coderanch.com

I have a longraw column in my Oracle Database. I converted it into Image Datatype in SQL Server...Now I wanna extract the files into my NT Folder. This is what I wrote. All microsoft files are opening (xls,doc,mpp,txt) but no pdf,jpg,bmp files are opening. Pls. help! what am i missing here? Is it because I converted Oracle Longraw to SQL server ...

79. Writing the csv file to database    coderanch.com

Shailesh is correct, you will receive lots of help with writing your code. You will receive less help trying to get someone to write it for you. Have you even an outline (pseudo-code) of what the code should do? Have you tried writing anything down yet? If so, post it here as a starting point. [ June 18, 2005: Message edited ...

80. Using props file for Stored functions and procedures    coderanch.com

- what are the benefits of moving a stored function or procedure to the props file ? - As we make the WAR file when we deploy, it always compiles anyway. - When in production, if I change the function/ procedure in the props file, is it necessarry to redeploy the WAR or just deploy only the props file? - what ...

81. Advise On Flat File    coderanch.com

Hi, I'm thinking of using flat file as database. But I don't know how good it is. Can someone point me a reference to a good API in accessing flat file? What type of file is good for this? Can I do stuff similar to "select", "update", "insert", or "delete" ? Regards, Susilo

82. How to upload a file to a database    coderanch.com

If you want to store data in a compressed format, whatever you retrieve will also be in compressed format, so you'll need to do the compressing/uncompressing yourself. The datatype to use would probably be a BLOB, which requires a JDBC 3.x driver. If I remember correctly, the Sun JDOC/ODBC bridge only supports a subset of JDBC 3, so you may need ...

83. How to download a file from database    coderanch.com

package rdb; import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; import com.oreilly.servlet.MultipartRequest; public class FinalUpload extends HttpServlet { public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { String filename=""; PrintWriter out = res.getWriter(); try { MultipartRequest multi= new MultipartRequest(req,"c:/visu/resumes",5*1024*1024); Enumeration files=multi.getFileNames(); File f=null; while(files.hasMoreElements()) { String name=(String)files.nextElement(); filename=multi.getFilesystemName(name); String type=multi.getContentType(name); f=multi.getFile(name); System.out.println("The File is "+f); } Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = ...

84. download file from access    coderanch.com

i have uploaded a .doc file to ms access database in a table with OLE data type.Now i need to retrieve it from the database and display it in .doc format.The code for uploading the file is package rdb; import java.io.*; import java.sql.*; import javax.servlet.*; import javax.servlet.http.*; import java.util.*; import com.oreilly.servlet.MultipartRequest; public class FinalUpload extends HttpServlet { public void service(HttpServletRequest req,HttpServletResponse ...

85. File upload    coderanch.com

86. Store file in access    coderanch.com

package Test; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import java.sql.*; import org.apache.commons.fileupload.*; import java.util.Iterator; import java.util.List; public class Sample1 extends HttpServlet { public void service(HttpServletRequest req,HttpServletResponse res) throws ServletException,IOException { PrintWriter out = res.getWriter(); try { boolean isMultipart = FileUpload.isMultipartContent(req); DiskFileUpload upload = new DiskFileUpload(); List items = upload.parseRequest(req); Iterator iter = items.iterator(); while (iter.hasNext()) { FileItem item = (FileItem) iter.next(); ...

87. Media player and .swf files not downloaded in https secure environment    coderanch.com

Hi, I am developing a website whuch runs under https protocol. I am showing the .avi and .swf files for some previews on my jsp pages. But these are not downloaded when i run the jsp. But when i put these files under different context of http protocol, and gives the absolute path of that context, it works properly. here is ...

88. how to pick files from the client machine    coderanch.com

Hi, I am uploading an image file in the sql server database. The database thing is working fine. But the problem comes when ever the jsp tries to pick up any file from the client machine. In that case if the folder on the client machine (in which image file is present) is not sharable, it give 'access denied' error. I ...

89. Problem in retrieving Excel file from Database    coderanch.com

Hi We have a requirement to store files into database and later we need to retrieve it.We need to store Excel files with contents.We have a column of type of Blob in Oracle Database 9.X.we have used OraclePreparedStatement,BLOB of oracle implementation to store the excel file content into database.the data gets stored in the database.We have used Oracle implementation of BLOB ...

90. Oracle-JDBC dll file    coderanch.com

hi, In our companey intranet , we have 6 java application running over same tomcat context. There is two EJB application whose EJB components r deployed on weblogic and web componets r in Tomcat and one application is using oracle thin driver and other 2 using sql server oci driver. B4 there is no problem.but we have created a new application ...

92. Reading VSAM files from a J2EE program    coderanch.com

93. JDBC & Flat files    coderanch.com

94. How to save a text file content in a database    coderanch.com

Hi, welcome to the ranch! This question could have many parts ... how to define the database table, how to read the file into memory, how to get the text into the database, how to get them back out. How much have you done and where are you stuck? Feel free to share smallish sections of real code to illustrate the ...

95. upload pdf files to database    coderanch.com

96. Writing into Excel file.    coderanch.com

Hi, That is correct, there are a couple of free api's to interact will excel or com in general. POI, IBM java-com bridge etc. Jintegra can be used to interact with any com component, although it has to be bought. If you are looking at just adding a column into the spread sheet the best way to do it is write ...

97. .db file    coderanch.com

98. How to get the file name and its data type?    coderanch.com

Hi ranchers, I am planning to write a method which a parameter of tableName(String type) will be passed in and will return a vector. That vector's element is a record which is a String array. To realize that function, I need: 1.to get the table's fileds count which is the length to initial array; 2. the first, second ... the n ...

100. reading excel file using jdbc [help me]    coderanch.com