🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: ibm.software.vajava.beans
Article #8

Re: Export from Java App?

#8
From: Tim Williams
Date: Fri, 22 Mar 2002 05:44
56 lines
3589 bytes
Are you thinking of having your database server write a file to the client
PC?  (I hope not) Or is it to write the file to the database server then
your Java App will copy it to the client?  Another option is just to select
the data from your java app and write some java code to write the file (not
very elegant, but effective).

A stored procedure mught be a good approach.  I've not looked at the IBM
classes but it's easy enough to implement with JDBC calls.

Can you provide more info on what you want to do and describe your
architecture in a bit more detail?

Tim.


"Christina Robertson" <robertson@OasisAdvancedEngineering.com> wrote in
message news:3C90E73A.D8F4F889@OasisAdvancedEngineering.com...
> Hi all,
>     I've got a question, hoping ya'll can help me find a solution.  I'm
> working on my company's database project. We are running DB2 v7.1 and
> users access the data through Java applications.  We are using "IBM Data
> Access Beans 3.5" to handle the connections, queries and modify
> routines.  All working very well :)
>
>     Now though users want to be able to export data from the databse to
> comma deliniated text files so they can import it into Excel and work
> with it there.  I have created some text files which do the export for
> them, but they ahve to copy the SQL statement text into the Command
> Center, run the query, etc.  These are business people, not programmers
> and its just too much for them. We end up holding their hand every step
> of they way and the truth is they don't want to keep using htis method.
>
>     So what I need to do is figure out how to let them just click a
> button in the Java application and poof the export is done for them.
> Here is where I'm not sure how to proceed.  The export statement is not
> a query, and its not a modify the way the data access package thinks of
> them. Trying to use the IBM Data Access Beans to do ths gives us
> errors.  Does anyone have a suggestion how I can run the command below
> from within a Java application?
>
> (This has been greatly simplified as far as the select goes but serves
> the purpose for example sake.)
>
> EXPORT TO C:\Export.txt OF DEL MODIFIED BY    coldel, chardel"" decpt.
> decplusblank datesiso MESSAGES C:\messages.txt SELECT * FROM TABLE
>
> Thanks all :)
>
> Chris
> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
> Christina Robertson - Research Engineer
> Oasis Advanced Engineering, Inc.
> Phone 248-373-9800 x 236
> Fax   248-373-9898
>
>
Technical Details
Message-ID: <hxzm8.1650$mR1.155767@news2.telusplanet.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!cyclone.bc.net!newsfeed.telusplanet.net!news2.telusplanet.net.POSTED!b37c4a73!not-for-mail
References: <3C90E73A.D8F4F889@OasisAdvancedEngineering.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109b1c,9d4f5582aa3717b5
X-Google-Attributes: gid109b1c,public
X-Google-ArrivalTime: 2002-03-21 21:44:48 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!207.217.77.43.MISMATCH!newsfeed1.earthlink.net!newsfeed.earthlink.net!news-hog.berkeley.edu!ucberkeley!cyclone.bc.net!newsfeed.telusplanet.net!news2.telusplanet.net.POSTED!b37c4a73!not-for-mail
From: "Tim Williams" <harlene_quinn@hotmail.com>
Newsgroups: ibm.software.vajava.beans
References: <3C90E73A.D8F4F889@OasisAdvancedEngineering.com>
Subject: Re: Export from Java App?
Lines: 58
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
Message-ID: <hxzm8.1650$mR1.155767@news2.telusplanet.net>
Date: Fri, 22 Mar 2002 05:44:45 GMT
NNTP-Posting-Host: 216.232.9.49
X-Trace: news2.telusplanet.net 1016775885 216.232.9.49 (Thu, 21 Mar 2002 22:44:45 MST)
NNTP-Posting-Date: Thu, 21 Mar 2002 22:44:45 MST