How to write a file to shared drive

3 views
Skip to first unread message

heartland

unread,
Feb 15, 2008, 9:40:33 AM2/15/08
to CSVChat
Hi,

It sounds strange. Write a file to local drive works fine. However,
the same code does not work with shared drive if I use "\\shared drive
\project\file.csv" as filepath. Is it the problem of CSV writer? or
something else?

Thanks in advance.

Hugh

shriop

unread,
Feb 15, 2008, 11:57:40 AM2/15/08
to CSVChat
CsvWriter has no problems writing to a UNC path like the one you're
describing, so it's got to be another issue, so let me list the things
I would try. If you use the EXACT same program with the EXACT same
code, just substituting in a local path, it works? If you run it in
debug mode and grab the running value of the directory and copy it
into windows explorer, does it pull up? Is there a file out there
already by that name that is marked as readonly? Is your program
running as you or under a different login? Does that other login have
permissions?

Lu, Hugh

unread,
Feb 15, 2008, 12:39:31 PM2/15/08
to CSV...@googlegroups.com
Hi,

Thanks for your help. It was the problem of that specific drive. CSV writer is just fine. BTW, can you give me a trick about how to write a column that is enclosed within a set of quotes such as:

"FileFormat", "number 10-22"

This communication is for use by the intended recipient and contains
information that may be Privileged, confidential or copyrighted under
applicable law. If you are not the intended recipient, you are hereby
formally notified that any use, copying or distribution of this e-mail,
in whole or in part, is strictly prohibited. Please notify the sender by
return e-mail and delete this e-mail from your system. Unless explicitly
and conspicuously designated as "E-Contract Intended", this e-mail does
not constitute a contract offer, a contract amendment, or an acceptance
of a contract offer. This e-mail does not constitute a consent to the
use of sender's contact information for direct marketing purposes or for
transfers of data to third parties.

Francais Deutsch Italiano Espanol Portugues Japanese Chinese Korean

http://www.DuPont.com/corp/email_disclaimer.html

shriop

unread,
Feb 15, 2008, 12:47:11 PM2/15/08
to CSVChat
It's not really something that is settable at that level. The original
intention was to not support the concept of requiring columns to have
quotes even though none of the data in the field requires it, so it
will by default quote the field if there's a comma in the field or
other significant characters along the same line. The only other
current option is to set all fields that the writer writes to have
quotes by setting the ForceQualifier setting to true. I suppose you
could set this option on and off before writing out certain fields as
it doesn't cache the setting and will look it up as it is writing the
data.

Bruce
>            http://www.DuPont.com/corp/email_disclaimer.html- Hide quoted text -
>
> - Show quoted text -

heartland

unread,
Feb 15, 2008, 12:57:10 PM2/15/08
to CSVChat
Hi Bruce,

I am glad that I asked. It works fine. I was struggling to play with
different trick. three sets of quotes, four set and so on. Always got
none or three.
Thanks again.
> >            http://www.DuPont.com/corp/email_disclaimer.html-Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages