Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Cannot update data in .txt/.csv file

  1. #1
    Junior Member
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Cannot update data in .txt/.csv file

    hello there.. i need some help right here..

    i am trying to connect my java application with .txt file using jdbc

    for the connection and query that's successful

    but when it come to updating data in my txt file this problem occured

    [Microsoft][ODBC Text Driver] Updating data in a linked table is not supported by this ISAM.
    why is this happening.. ??

    and how to solved this problem... i am a newbie with setting up .txt file as database for java application..


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,372
    Thanks
    184
    Thanked 836 Times in 779 Posts
    Blog Entries
    5

    Default Re: Cannot update data in .txt/.csv file

    i am trying to connect my java application with .txt file using jdbc
    jdbc connects to a database, not a text file. So you may need to clarify. Are you saying you wish to read a text file and update a database with that information?

    The error you are receiving may be database dependent, and my first guess is that you are connecting to a database as a user without UPDATE privileges.

  3. #3
    Junior Member
    Join Date
    Oct 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Cannot update data in .txt/.csv file

    Quote Originally Posted by copeg View Post
    jdbc connects to a database, not a text file. So you may need to clarify. Are you saying you wish to read a text file and update a database with that information?

    The error you are receiving may be database dependent, and my first guess is that you are connecting to a database as a user without UPDATE privileges.

    first of all.. i do not want to read a file and update database with the information in the file.. i am making a text file as my application database.. connecting using jdbcodbc driver .. connecting the the file and running an query is successful

    but i tried to update data in my text file using SQL UPDATE statement and unfortunately it didn't work out..
    and the error occur as i have mentioned in my first post. So i thought there must be any way using any of file manipulation Class that can do something like this

    [highlight=JAVA]

    1. get the field first value
    2. update the second value which is the second column based on the value of the first column

    [highlight]

    but i don't have any idea how to do that.. or can UPDATE statement can be used to update the data in my text file??

Similar Threads

  1. [SOLVED] Compressed data from XML file
    By eclipse in forum File I/O & Other I/O Streams
    Replies: 6
    Last Post: July 15th, 2010, 03:39 PM
  2. How to append data to an already existing file?
    By siteregsam in forum File I/O & Other I/O Streams
    Replies: 1
    Last Post: May 3rd, 2010, 03:31 PM
  3. Retrieving Meta-Data from a File
    By FretDancer69 in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: February 9th, 2010, 08:10 AM
  4. Read data from text file
    By yroll in forum Algorithms & Recursion
    Replies: 4
    Last Post: December 31st, 2009, 01:40 AM
  5. Virutal File Directory from Given dAta
    By hugsheals in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: July 28th, 2009, 04:39 AM