Re: Any ideas Forms 4.5, SQLPLUS and Word?
Date: Wed, 21 Apr 1999 17:51:08 GMT
Message-ID: <371E100F.A2C65AD2_at_nospam.flash.net>
Fraser Boswell wrote:
> We have scripts kept in sql files in the filesystem which we want to
> run. These will create CSV files for use in a mail merge. So from Forms
> 4.5 we want a user to run the script by pressing a button, and when that
> is finished open Word for Windows with the mail merge set for the data
> file created. We want to do this in one go. Problem is, setting the
> script off to run in sqlplus works fine, but as the script may take some
> time to run, if we run this HOST('sqlplus username/pwd_at_dbname) command
All you need do is change your command to 'start/w sqlplus
username/pwd_at_dbname @command'
The /w tells windows to wait until it finishes. You also need to call
sqlplus and word from the
[Quoted] same batch file to make it work. Here is an example that works:
HOST('echo start/w plus80w.exe loya/barber_at_ora8srv @test_w
>c:\temp\junk.bat',NO_SCREEN);
HOST('echo "C:\Program Files\Microsoft Office\Office\WINWORD.EXE"
"c:\temp\junk.kil" >>c:\temp\junk.bat',NO_SCREEN);
HOST('c:\temp\junk.bat',NO_SCREEN);
There are other ways you could do it, but this one is fairly easy. I am
creating a DOS batch file
by redirecting the echo command to a file. The start/w insures that Word
will not start until the
plus80w statement finishes. My test_w.sql script spools data to
c:\temp\junk.kil. Word then picks
that up. Your situation is not exactly this, but I believe you can modify
this to get where you want.
Loyal Barber
BLT Soft Incorporated
-- The difference between Windows 95 and 98? 3!Received on Wed Apr 21 1999 - 19:51:08 CEST