Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with HOST and quotes, spaces, long filenames in NT4

Status
Not open for further replies.

ShaneKDev

Programmer
Nov 27, 2001
4
0
0
GB
Folks,

Consider the following environment:

Server: Oracle 8.1.7
Clients: Win9x, WinNT [4.x, 5.x]

We have a piece of PL/SQL code which exports data from the database into a csv file and then we want the contents of the CSV file to be displayed in Excel. We do this by using the HOST command, e.g:

HOST start mycsvfile.csv

....which, if all goes well, performs the equivalent of the DOS 'START' command and passes it the mycsvfile.csv parameter. Assuming that Excel has been associated with .csv files, it then starts up and displays the contents of the file - this all works swimmingly in Win9x.

However...... the name of the file I've used in the example above is pretty straightforward - our export files will have fully qualified pathnames - which may or may not contain spaces: e.g.

C:\path to some dir\mycsvfile.csv

To get around this, we employ the normal tactic of placing "'s around the filename i.e.:

HOST start "C:\path to some dir\mycsvfile.csv"

which works in Win9x - but WinNT seems distinctly unhappy with any filename, spaces or not, if we include "'s around the filename - when we run the command under WinNT we get two DOS boxes - one which appears and then disappears very quickly [no doubt it also contains some pertinent error message but it disappears too quickly for us to see it] - and then a second DOS box appears with a normal command prompt......

We've seen some articles on Oracle's MetaLink which contain BugID's for bugs which might be related to the problem we're experiencing but when we then search for the articles matching the applicable BugID's we get no results.

Has anyone come across this problem and/or a solution.....

Note: I've shown hardcoded filenames/paths in the example above - in our application they're not actually hardcoded, but received from the user via a dialog box in Oracle Forms] and then passed into our SQL script as a parameter.

ShaneKDev
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top