Made a sql database, can use select and insert. Made the database from notepad and renamed it .sql and works fine (mysql). How do I insert new rows into the database AND have the new rows saved in my .SQL file for permanent storage? Basically what i am saying is i can insert stuff but it does not save it for future use or can it??? Thanks in advance roba dbnewbie
If you are inserting through a Java program, you can write code to insert the row via JDBC and append it to your file using Java's I/O APIs. If you inserting at the mysql command line, you are going to have to manually add it to the file each time. Although I suppose you could write an operating system batch file to do it for you.
ok sounds like i will have to use java to do it. Ill look in the api's there than. Hopefuly that answers my other question... I have used the PrintStream object but notised it does not let you add to files it only saves a new copy each time. example .. Program makes a 'A' than tommorow you want to add a 'B'. load up the file and it just shows a 'B' no more 'A'. So i assume there is another object for adding to files. Just like the save button would do in 'NOTEPAD' or most other applications. roba
author & internet detective