file 4 « file « Java Database Q&A





2. Accessing Files on a remote server    coderanch.com

While databases can handle files, as binary items (blobs), its not generally a good practice. One of the problems with putting files in the database is that they often outweigh the structured data, making the database difficult to work with. In general, files aren't good places for databases because they are completely unstructured. The database can't normalize, index, or do much ...

3. How to make from .class files and Access database(dsn...) an .exe file self-run    dbforums.com

Subject: How to make from .class files and Access database an .exe file self-run Java GUI App, Event/Data-Driven (DESKTOP APP) for a PC without Access/Java config... I read a TEXTBOOK about Java & Databases but does not say about building a Developers Product ready for sale, only how run the java App in my special configured java&Access PC, Well how from ...

4. Storing XML files in a database    dbforums.com

How would I go about doing the following: Using a Java Servlet I want to receive an XML file and other textual info and store the XML file in a database as a BLOB. The information is being sent to the server using JSP on the client machine. I also then want to be able retreive this XML file and send ...

6. How to get Jar files to work with Databases    java-forums.org

Hey all, I made a cool little database program with the latest version of mysql connector j. When I compile it, it works great. But, when compress it into a .jar file (runnable program file), it doesn't work. There must be something I'm doing wrong. Do I need to put the mysql-connector .jar file somewhere? I know how to find my ...

8. jdbc (java.util.)Properties file    java-forums.org

This code snippet reads from a file named 'database.properties', however, I would like to know what format should the properties be written? I'm trying to connect to a postgre database, hence, included file named postgresql-8.3-604.jdbc4.jar within the project. :confused: Java Code: import java.sql.*; import java.io.*; import java.util.*; /** This program tests that the database and the JDBC driver are correctly configured. ...

9. how to get the full file name    java-forums.org





10. How to parse a .db file ?    java-forums.org

11. Log file for sqlldr    java-forums.org

When I run the java program to load file into Oracle DB, it creates a log file with the name of control file in the same directory where class is. How can I make a log file to a log directory? Can I put l a log file name to control file? Thanks, Oleg

12. Accessing local file from server side using Java Application    java-forums.org

Hi I want to write a code that will access the local file from the server side using Java Application. I have my java code running as a server and I want to access the file located in the local system which is connected with the server where my java code is running. Thanks Sachin

13. Problem with ResultSetMetaData getPrecision and getScale on .DBF files.    java-forums.org

Its just like the topic name says. Being more specific: Im using the following methods to test: Java Code: public static void main(String[] args) { try { ConexaoDBASE conexaoDBASE = new ConexaoDBASE(); conexaoDBASE.conectar(DBases.AIH); Connection conexao = conexaoDBASE.getConexao(); ResultSet resultado = BancoDAO.lerBancoCompleto(conexao, "Morb"); ResultSetMetaData metaData = resultado.getMetaData(); for (int i = 1; i <= metaData.getColumnCount(); i++) { System.out.println(metaData.getColumnName(i)); System.out.println(metaData.getPrecision(i)); System.out.println(metaData.getScale(i)); System.out.println(metaData.getColumnDisplaySize(i)); System.out.println(); ...

14. problems uploading big file in LONGBLOB    java-forums.org

15. file not found    java-forums.org

hello guys i m a beginner java programmer and have created a small access database... now i want to connect that database in the java program.. i hv written the code but wen i rum it, it says dat file(database) not found pls help me... i m using netbeans6.7.1 the code i wrote is package practiceptograms; import java.sql.*; public class Database ...

16. How to add data into excel file    java-forums.org





17. Help. two text files    java-forums.org

Hello, I have problem i need to do this project. "We have a text-file list of products: Name, quantity received, quantity sold, date and time. File of the same brand name can be repeated. The second is a text file, we can have a full trade price list: Name, price, date. Need to make output list. Name, price, quantity sold, date ...

18. Protecting a file    java-forums.org

I have created a custom data file in java. It basically contains one long String that represents a data structure I need for my program. However, I want to make this file be safe and to have nobody be able to open it in Notepad or whatever, and read its contents (even if those contents are a bit scrambled). I tried ...

19. jar files problem    java-forums.org

i just made a project in netbeans that use mysql as backend now i build the file which created a jar file now this jar file is appearing as a rar file icon in computers other than me. Now what should I do to make a system that makes it possible for my software to run on the other computers................... i ...

20. How to write column by column to text file    java-forums.org

Since you are writing the content to a text file, you can do something like this. Calculate the number of rows initially. Once the first column is written into the text file, move to next column and to beginning of the text file. Then read the each line and append the new stuff to is and write back to file. But ...

21. how to write URL content to a file    java-forums.org

import java.net.*; import java.io.*; public class URLConnectionReader { public static void main(String[] args) throws Exception { URL yahoo = new URL("http://www.yahoo.com/"); URLConnection yc = yahoo.openConnection(); BufferedReader in = new BufferedReader( new InputStreamReader( yc.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) System.out.println(inputLine); in.close(); } } It's printing me as a output at the console and i need the same output in ...

22. change the database to text file    java-forums.org

hi...I have this code that use mysql database to save data.... it's about editing and adding employee information.... I want to change it to use a file like text file to save data and doesn't use database who can help me to change this program.... Thank you very much.... Java Code: import java.io.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.sql.*; ...

23. How to Assign a Access database file directly from my code ?    java-forums.org

Hi All, I am using an Access database in my code. Actualy my code works frine, but I do not want to use ODBC Administrator within Administrative Tools from my Control Panel. Can I assign this access DB file from my code without manually defining it from Administrative tools ? *.mdb or *.accdb, doesnt matter. Please help.

24. loading data from a text file    java-forums.org

Is there a simple way to load data from a text file into a Derby database? For example, in MySQL, I can accomplish this with the following command: mysql> load data local infile 'file_name' into table table_name; where file_name is the text file with the data to be loaded and table_name is the name of the table where the data is ...

25. Video file    java-forums.org

26. export access database to excel file    java-forums.org

27. .dat file writing and opening    java-forums.org

28. Can I use annotations in superclass, and .cfg.xml files in subclasses    java-forums.org

Hi, There is a common project, to which my application is going to interact. The common application is in JPA-using annotations in the model classes. Some of the model classes in my application is going to extend the common project's model classes. But my application uses .cfg.xml files for the model classes. So do I have to change the hibernate configuration ...

29. distributing a DB in a .jar file    java-forums.org

I have a program (called Flash) that makes use of a Derby embedded database. It works great. I want to package the program and database into a .jar file. I create the .jar file with: jar cvfe Flash.jar Flash *class images/* flashdb/* where the images directory contains .jpg files used in the program and flashdb is the Derby database. The .jar ...

30. operations on records into files without DB    java-forums.org

hi i want a programe that how to Write a small record management application for a school. Tasks will be Add Record, Edit Record, Delete Record, List Records. Each Record contains: Name(max 100 char), Age, Notes(No Maximum Limit). No database should be used. All data must be stored in one or two files. Listing records should print the names of the ...

31. Read file from database    java-forums.org

Hello, Im new to java and new to this forum, so I hope you will be patience with me :) What Im trying to do is this: I read a file from database, and I need to show this file directly to the user. This file is saved as Blob in Oracle database and I read it in this way: String ...

32. entering textfile into database    java-forums.org

I am facing problem in loading connector.Please help me. Here is my code.... import java.io.File; import java.io.FileInputStream; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; public class InsertTextFileToMySQL { public static Connection getConnection() throws Exception { String driver = "com.mysql.JDBC.Driver"; String url = "jdbc:mysql://localhost/myfiles"; String username = "root"; String password = "123456"; Class.forName(driver); Connection conn = DriverManager.getConnection(url, username, password); return conn; } public ...

33. regarding saving files or objects in database    java-forums.org

hi to all, I need a suggestion from regarding saving object or any kind of file either it is a object or simple file or word document or image etc.. to a sql database.What is the efficient way to store such kind of objects to save in database. I know only two kinds of saving objects. 1)Using Blob and saving object ...

34. Network File based Databases with Java for multi application access    java-forums.org

Hello all. I am trying to figure our what would be the appropriate database to use if I am limited to storing the database on a local network drive and it must allow multiple users using instances of the same desktop application to go in and update individual records without locking up the whole database per connection. From what I understand ...

36. How to use a .csv file as a database ?    forums.oracle.com

Hi everyone, I have a .csv file and I need to update some values in a column based on some condition. Basically I want to use the .csv file as a database such that I can perform query on it and update the result set as required. I am having trouble using csvjdbc though, can anyone give me a simple example ...

37. Problems with jdbc and .jar files.    forums.oracle.com

I am having a problem with connecting to my database when running my .jar file as an executable. It connects correctly when I use the java command in command prompt and it also runs correctly when using my IDE. Is there something that needs to be added to the manifest or in the code it self inorder for the program to ...

38. How to map a database file kept inside the jar file    forums.oracle.com

Because, getResourceAsStream is already "opening the file". If you wish to use the data in the file outside of the program, you are going to need to read from the jarfile, write it out to someplace else, then use that copy. You won't be able to use it as shown in your example from inside the jarfile. If it must be ...

39. Text File Database    forums.oracle.com

maybe my question was in wrong context, but, i do have experience and i did made some research on OOP, i worked with ERwin, BPwin, MS SQL 2000, MS SQL 2008, MySQL, PHP, Visual C++, Visual Basic and Visual Basic .NET. But i never worked with Flat databases, text file or CSV databases, there is where the problem starts, this type ...

40. speed concerns: read text file or load into embedded db?    forums.oracle.com

I am writing a simple utility that will perform a few functions and be called from a command line. 1: on-demand download a gzipped text file from a public url and extract 2: perform a text search and return matching lines to the output Ex 1: java myClass.class --refresh Ex 2: java myClass.class "search string" The text file is currently @ ...

41. StringTokenizer, textfile, Database Help    forums.oracle.com

I am trying to create a utility that will populate an access database that I have created using flat text files. I have been advised by my professor to use the scanner and stringtokenizer (tab delimited). I have a separate DbSource class that I am using in conjunction with my utility. I run the file and no error messages come up ...

42. Java Utility- Populate Access Database using several .txt files    forums.oracle.com

I am fairly new to java programming and have the task of creating a java utility to populate an access database (which is already created and has several tables) from text files which have the appropriate data. This seems to me to be an often used utility. Is there by chance a downloadable code/application that people are familiar with? Any help ...

43. Where to place the mysql-connector-java-3.0.17-ga-bin.jar file?    forums.oracle.com

Hi, I am creating SAP WebDynpro forms using SAP NetWeaver Developer Studio. I will create an application which will connect with mySql database and insert data into mySql Database. I have defined a new classpath variable in Windows->Preferences->Classpath Variables by the name mysqlconnector and the path is D:/mysql/mysql-connector-java-3.0.17-ga-bin.jar . Please tell me whether I am right or not. Regards Kaushik Banerjee ...

44. Saving the state of an application - db, file, object?    forums.oracle.com

Hi, this is a general programming question, I don't understand when to use databases, files or just save objects to save a state of an application. If you can point me to a tutorial, that would be very helpful. Here I have specified my problem. I am creating a personal finance application. I am planning to have a month-object, which saves ...

45. Why is my WAR file still referencing data from the old database server?    forums.oracle.com

OK I will outline the steps: 1. I downloaded a perfectly functioning WAR fIle 2. Uncompressed it 3. Changed the database settings in the Database.properties file 4. Made it a WAR file again 5. Imported it in Eclipse IDE using File -> Import 6. Ran a test client by right clicking the WSDL and selecting Web Services->Generate Client Now when I ...

47. flash file in db    forums.oracle.com

48. RE: Build own search engine using java from flat file database    forums.oracle.com

Hi All, I have a class project in database management systems. I am asked to build a query search engine in java but not using jdbc or any other database connectivity. Rather, I should build my own query runner that uses flat files as database. I am really confused on how to parse a SELECT query that gets results from flat ...

49. Uploading huge file to database    forums.oracle.com

how huge? I'll assume gigantic: 1) use a BufferedReader, or the commons-io LineIterator, to loop through the file line for line without having to read the entire thing in memory. 2) perform your validations on the record, there is no real standard way of doing this 3) put record in database I don't know which technology you are going to use ...

50. read data from db and write it into the txt file    forums.oracle.com

hi all could anyone please help me regarding the following: i would like to read the data from database using sql query and the write the data into a text file. I am able to connect the db, run the query, create file...but not knowing how to write the data into the file. could anyone please help me out. thanks in ...

52. Need help with a JDBC Result Set --> XML flat file    forums.oracle.com

3) Should I create all of the distinct team Team objects and then come back and parse each record to gather results? i figure it will be a large while() where I loop through each team in the college and: while (Collection of teams is not empty, starting at first team) if Team.teamName = home_team || away_team{ if Team.teamName = first ...

54. Match file against DB    forums.oracle.com

55. how to track changed file data stored in a database    forums.oracle.com

Take highway 19 until you reach the turnoff for the old quarry road. Turn left onto the old quarry road and travel 1.2km. Leave the car and travel through the dark woods to the south. Ignore the man-sized spiderwebs above. When you reach the river, take the rickety ferry across the river. You must succeed on a DC16 boating check or ...

56. how to store file content in database??????    forums.oracle.com

57. How to save the Icon to database or .ico file?    forums.oracle.com

You can't produce an .ico file. I don't know what format it is either - find that out, I think it's just a BMP or something; maybe you can use ImageIO to write that appropriate format (possibly after painting it to a BufferedImage first), then rename the file. As for DBs: PreparedStatements have a setBlob method. You could store the serialized ...

59. retrieve file path of image from database    forums.oracle.com

60. RMI + JDBC + file transference - URGENT!!    forums.oracle.com

wanderley.drumond wrote: Ol pessoal tenho uma dvida a qual tenho que utilizar comandos JDBC de forma remota e tenho que fazer a transferncia de arquivos, algum tem idia de como fazer isso? Entre RMI e sockets achei sockets mais complicado, o problema que RMI no nada simples, algum poderia me ajudar? Hello people, I have a doubt which I have ...

61. help regarding storing a file into database    forums.oracle.com

Yes. If you are using Oracle for instance you can read the file through a byte stream and write the bytes to a table column that is a BLOB type. When you want to retrieve the file simply read the bytes from the BLOB column in that row and write the bytes to a file.

64. program to get files from oralce database    forums.oracle.com

65. generating .csv file with the datas from the database    forums.oracle.com

Hi Java experts, Ihave a current assignment to generate a .CSV file using java getting values from database. The output CSV file may have more than one row and each row should have a end of line delimiter. Any help in giving a template for generating a CSV file accessing from database is greatly appreciated.

66. How to read file contents from database    forums.oracle.com

// Loop through while reading a chunk of data from the BLOB // column using the getBytes() method. This data will be stored // in a temporary buffer that will be written to disk. bytesRead = image.getBytes(position, chunkSize, binaryBuffer); // Now write the buffer to disk. // outputFileOutputStream.write(binaryBuffer, 0, bytesRead); out.write(binaryBuffer, 0, bytesRead); totbytesRead += bytesRead; totbytesWritten += bytesRead;

67. how to upload the file to database    forums.oracle.com

68. How to create image file after retrieve it from database?    forums.oracle.com

The problem how to get "img" into bytes before write it to a file? But you already have the array of bytes, it's b. img is an Image. It is a thing that can be painted etc; it simply doesn't have an array of bytes. You can - with a lot of work - find the colours of the pixels that ...

69. how to upload media file to a database?    forums.oracle.com

70. my code is upload the file in database how to over write the fields in data    forums.oracle.com

public class ExportCSV { public static void main(String[] args) { try { BufferedReader br = new BufferedReader(new FileReader("C:/Nani/test1.csv")); String temp = ""; int counter = 0; ArrayList list = new ArrayList(); StringTokenizer st = null; StringBuffer query = null; br.readLine(); while((temp = br.readLine()) != null){ query = new StringBuffer(); query.append("INSERT INTO TEST (ENO,ENAME,DOJ,SALARY,DEPTNO,ATTENDENCE) VALUES("); st = new StringTokenizer(temp,","); int j = ...

72. Local file database that encrypts    forums.oracle.com

73. Would you put XML and HTML files stored in the database as files?    forums.oracle.com

Hi, Basically that is my question. My criteria is that I will be given some XML files, I need to save the XML file somewhere for future reference. However I also have to store when it was registered and so on. Would you install this in the database? Or you would just store the path where it is deployed? Regards, Sim085 ...

74. creating .jks file from .db file    forums.oracle.com

Hi, Am trying to create a .jks file from a .db file. I am using iPlanet to configure my website. When you create a trust db in iPlanet, it creates .db files. An application that I'm trying to use works only with .jks files. I think I can use the keytool tool to do this but cannot tell based on the ...

76. Deliminated database files    forums.oracle.com

I am currently trying to use deliminated files to extract data. I am having problems with the tokenizer only recognising a single delim "~" when there are consecutive "~~", is there any other way to extract the data? or is there a way to make the program return the "null" token in between the "~~"? eg string~string~string~~string~string should return string string ...

77. File DB    forums.oracle.com

Dears: I have three files which has these extensions: 1- .DB 2- VAL 3- PX These files contain data for my work, and i should create a program to read these files, but the person who create these files is not available, so what is the best way to make Java Application to Read from these file. I don't know what ...

80. How to create a file in memory and then store it in database    forums.oracle.com

Hi Guys, I'm wondering how could i create a file such a plain text or css styleshhet in runtime and then store this file in the database. I need to save them in the database cause the application doe not have write permission to filesystem. Is that possible ? Can a file be created only in memory and saved in database ...

81. Diifferent java apllications write to the same flat file database    forums.oracle.com

I have a variety of java applications that need to be able to write diagnostics to the same flat file database (containes just one file). Could somebody give me the pointers what is the best way to write my applications so that different application not need to worry about the updates in file? They should be able to write whenever they ...