you apparently missed our naming policy on the way in, which we take VERY seriously. You need a real first AND last name, separated by a space. Obviously ficticioius names are also not allowed. Please go here and correct your profile.
[ June 02, 2006: Message edited by: fred rosenberger ]
There are dozens of examples just like this all over the web. The above are two hits I got right off the bat via Google.
In a nutshell, use JDBC to connect to your database and obtain a ResultSet. Iterate over your ResultSet and use either JDBC again, or a straight file output using the Java IO API to generate your CSV file.
Also, I think your name is against the Java Ranch naming policy. You may want to update it before one of the moderators notice. EDIT: Too late.
[ June 02, 2006: Message edited by: Jody Brown ]
For storing data or exporting it as a CSV, we can use the fputcsv() function. In connection with a proper header (content-type and content-disposition) it will prompt the user to either open our script output in Excel or save it.
Now to read up on this fputcsv() function.
Originally posted by Jody Brown:
That's even better! Thanks very much!
[ June 02, 2006: Message edited by: Leon Keylin ]