Re: writeXML(fullFilePath) DOESN'T Write
From: Ilya Tumanov [MS] (ilyatum_at_online.microsoft.com)
Date: 07/08/04
- Next message: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Previous message: Neil Cowburn [MVP]: "Re: Does .net CF support remoting?"
- In reply to: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Next in thread: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Reply: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 08 Jul 2004 00:03:55 GMT
You can not read files into the dataset from local hard drive. Emulator has
no access to local hard drive at all and is unaware of its existence.
It's not mapping files on your hard drive to \Program Files\Project or to
any other folder for that matter.
Emulator's file system is independent from desktop's file system and
physically located in the desktop RAM (might be persisted onto hard drive
as an image).
Project files (including XML you're loading) are not mapped from your hard
drive onto emulator file system; they are copied into it on deployment.
If you delete or change file in project folder, its copy in the emulator
will remain unchanged (until redeployed).
If you save or change file inside emulator, it will stay inside emulator
and won't be accessible on desktop.
Consider real device isolated from desktop (i.e. disconnected).
Can you save files on this device? Sure. Can you use your desktop to see
them?
Not really. Emulator is very "real" in that sense, it's a separate entity.
You have to use emulator's file explorer to check emulator's file system,
using desktop explorer won't do you any good.
Best regards,
Ilya
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
> Thread-Topic: writeXML(fullFilePath) DOESN'T Write
> thread-index: AcRkdUu5PLE0fNBeQP6gmT/xBO5kSA==
> X-WBNR-Posting-Host: 68.220.90.130
> From: =?Utf-8?B?QXJ0IENhYm90?= <trash@stricklandtechnical.com>
> References: <BCA6D9DC-F5B4-4E33-9F02-02FA480EFC4A@microsoft.com>
<u5RU8KyYEHA.3512@TK2MSFTNGP12.phx.gbl>
<AEF3C342-A1B4-4A83-B4D9-437AC56968D1@microsoft.com>
<D47D22B7-C890-462A-BE94-13C7C229D4D2@microsoft.com>
<pQ7omM9YEHA.2804@cpmsftngxa06.phx.gbl>
<35A84A1B-89D3-4F3A-BF41-7260DC7B05CA@microsoft.com>
<tpKX2$EZEHA.2804@cpmsftngxa06.phx.gbl>
> Subject: Re: writeXML(fullFilePath) DOESN'T Write
> Date: Wed, 7 Jul 2004 15:54:01 -0700
> Lines: 232
> Message-ID: <60CD7875-2225-442A-BE20-4B3AD8E488E1@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.dotnet.framework.compactframework
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
> Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:56843
> X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
>
> Are you saying that even though I can READ the file into the dataset from
the local hard drive's directory (which the emulator is mapping as \Program
Files\Project\), I can't WRITE the file back to the same location?
>
> So far, I haven't tried to find it inside the emulator and wasn't even
aware that it was that functional. Guess it's worth a try, though.
> --
> Art Cabot
> Strickland Technical Services, Inc.
> Augusta, Georgia
>
>
> ""Ilya Tumanov [MS]"" wrote:
>
> > I'd say that's a concrete proof the file is saved.
> > Should file not be saved, you would get FileNotFound exception which
you
> > had before on attempt to load file without proper path.
> > If you have doubts, you can add some data into the DataSet, save it,
load
> > it again and see if data was actually loaded.
> >
> > As to missing file, by any chance, are you trying to locate this file
on
> > desktop's hard drive using desktop's search and explorer?
> > If so, you won't be able to find it as emulator's file system is
emulated
> > as well and is not mapped to desktop's file system.
> >
> > If you're using file explorer on the emulator, could you please
describe
> > how exactly you're navigating to the emulator's root folder?
> >
> > Best regards,
> >
> > Ilya
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > --------------------
> > > Thread-Topic: writeXML(fullFilePath) DOESN'T Write
> > > thread-index: AcRkE14P0uSfOuRmQNyl7qC28hJUhg==
> > > X-WBNR-Posting-Host: 68.220.90.130
> > > From: =?Utf-8?B?QXJ0IENhYm90?= <trash@stricklandtechnical.com>
> > > References: <BCA6D9DC-F5B4-4E33-9F02-02FA480EFC4A@microsoft.com>
> > <u5RU8KyYEHA.3512@TK2MSFTNGP12.phx.gbl>
> > <AEF3C342-A1B4-4A83-B4D9-437AC56968D1@microsoft.com>
> > <D47D22B7-C890-462A-BE94-13C7C229D4D2@microsoft.com>
> > <pQ7omM9YEHA.2804@cpmsftngxa06.phx.gbl>
> > > Subject: Re: writeXML(fullFilePath) DOESN'T Write
> > > Date: Wed, 7 Jul 2004 04:13:01 -0700
> > > Lines: 145
> > > Message-ID: <35A84A1B-89D3-4F3A-BF41-7260DC7B05CA@microsoft.com>
> > > MIME-Version: 1.0
> > > Content-Type: text/plain;
> > > charset="Utf-8"
> > > Content-Transfer-Encoding: 7bit
> > > X-Newsreader: Microsoft CDO for Windows 2000
> > > Content-Class: urn:content-classes:message
> > > Importance: normal
> > > Priority: normal
> > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> > > Newsgroups: microsoft.public.dotnet.framework.compactframework
> > > NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
> > > Path: cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> > > Xref: cpmsftngxa06.phx.gbl
> > microsoft.public.dotnet.framework.compactframework:56772
> > > X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
> > >
> > > Sorry, I meant to tell you...
> > >
> > > When I tried your suggestion of immediately creating another dataset
and
> > trying to read the file just "created", as in:
> > >
> > > Dim ds As DataSet = New DataSet
> > >
> > > ds.WriteXml("\Foo.xml")
> > > MsgBox("Just executed the WriteXML command")
> > > Dim anotherDs = New DataSet
> > >
> > > anotherDs.ReadXml ("\Foo.xml")
> > >
> > > MsgBox("Just executed the ReadXML command")
> > >
> > > it executes with no exceptions --- and no file. I've looked for the
file
> > at all levels of the directory from which the app is running, both
manually
> > and via Search. I already know where the app is READING the XML file
from
> > and, since the path I give the writeXML function is exactly the same,
it
> > seems the file should be there. If it is, though, it's invisible.
> > >
> > > As posted earlier, a programmer at our corporate office tried to
write
> > XML within both Windows CE and Pocket PC emulators and it worked. This
is a
> > very frustrating mystery...
> > > --
> > > Art Cabot
> > > Strickland Technical Services, Inc.
> > > Augusta, Georgia
> > >
> > >
> > > ""Ilya Tumanov [MS]"" wrote:
> > >
> > > > Could you please describe how exactly you're looking for a file?
> > > > I also wonder if you get an exception on attempt to load saved
file...
> > > >
> > > > Best regards,
> > > >
> > > > Ilya
> > > >
> > > > This posting is provided "AS IS" with no warranties, and confers no
> > rights.
> > > > --------------------
> > > > > Thread-Topic: writeXML(fullFilePath) DOESN'T Write
> > > > > thread-index: AcRju6KwGDQVK4dfRI6GvmgalEjZcg==
> > > > > X-WBNR-Posting-Host: 68.220.90.130
> > > > > From: =?Utf-8?B?QXJ0IENhYm90?= <trash@stricklandtechnical.com>
> > > > > References: <BCA6D9DC-F5B4-4E33-9F02-02FA480EFC4A@microsoft.com>
> > > > <u5RU8KyYEHA.3512@TK2MSFTNGP12.phx.gbl>
> > > > <AEF3C342-A1B4-4A83-B4D9-437AC56968D1@microsoft.com>
> > > > > Subject: Re: writeXML(fullFilePath) DOESN'T Write
> > > > > Date: Tue, 6 Jul 2004 17:45:01 -0700
> > > > > Lines: 64
> > > > > Message-ID: <D47D22B7-C890-462A-BE94-13C7C229D4D2@microsoft.com>
> > > > > MIME-Version: 1.0
> > > > > Content-Type: text/plain;
> > > > > charset="Utf-8"
> > > > > Content-Transfer-Encoding: 7bit
> > > > > X-Newsreader: Microsoft CDO for Windows 2000
> > > > > Content-Class: urn:content-classes:message
> > > > > Importance: normal
> > > > > Priority: normal
> > > > > X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> > > > > Newsgroups: microsoft.public.dotnet.framework.compactframework
> > > > > NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 127.0.0.1
> > > > > Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
> > > > > Xref: cpmsftngxa06.phx.gbl
> > > > microsoft.public.dotnet.framework.compactframework:56729
> > > > > X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
> > > > >
> > > > > I thought I might have the answer when I saw this in the
emulator's
> > Help
> > > > file:
> > > > >
> > > > > The following hardware and drivers are not supported in the
Emulator:
> > > > >
> > > > > Universal serial bus (USB) devices
> > > > >
> > > > > PC Card devices
> > > > >
> > > > > Storage devices, which include compact flash (CF) cards and hard
> > disks
> > > > >
> > > > > File system drivers, which include file allocation table (FAT),
> > compact
> > > > disc (CD), and digital video disc (DVD) drivers
> > > > >
> > > > > IEEE 1394 devices
> > > > >
> > > > > But when I had a couple of programmers at our corporate
headquarters
> > try
> > > > on both a Windows CE and Pocket PC emulator, it worked for them.
> > > > >
> > > > > What am I missing?
> > > > > --
> > > > > Art Cabot
> > > > > Strickland Technical Services, Inc.
> > > > > Augusta, Georgia
> > > > >
> > > > >
> > > > > "Art Cabot" wrote:
> > > > >
> > > > > > Right now it's running on a Windows CE emulator and reading its
> > input
> > > > XML into the dataset from the path noted in the code I've provided
> > (using
> > > > variable sPath). I'm simply trying to write the XML back out to the
> > same
> > > > path using the ds.writeXML(fullPath) command.
> > > > > >
> > > > > > The only reason rights are being mentioned at all is because
we're
> > > > trying to figure out why the XML is not getting written back out.
If I
> > use
> > > > one of the sample code pieces from the VB .NET Resource Kit ("How
To
> > Write
> > > > An Offline Application") that runs under the full .NET Framework,
it
> > works
> > > > great, but when I move down into the Compact Framework, it won't
write.
> > > > > >
> > > > > > To reiterate, it throws no exceptions, but the file just isn't
> > there
> > > > --- anywhere --- when I look.
> > > > > > --
> > > > > > Art Cabot
> > > > > > Strickland Technical Services, Inc.
> > > > > > Augusta, Georgia
> > > > > >
> > > > > >
> > > > > > "Alex Feinman [MVP]" wrote:
> > > > > >
> > > > > > > Wait a minute... Are you doing this on a Windows CE device or
on
> > the
> > > > > > > desktop? If on the device, what Write Rights are you talking
> > about?
> > > > Windows
> > > > > > > CE does not have filesystem permissions. Or perhaps you
expect to
> > > > find the
> > > > > > > dataset xml written by the code on the device in your PC
> > filesystem?
> > > > > > >
> > > > > > > --
> > > > > > > Alex Feinman
> > > > > > > ---
> > > > > > > Visit http://www.opennetcf.org
> > > > > > > "Art Cabot" <trash@stricklandtechnical.com> wrote in message
> > > > > > > news:BCA6D9DC-F5B4-4E33-9F02-02FA480EFC4A@microsoft.com...
> > > > > > > > I'm trying to write a DataSet back out to the same location
it
> > > > reads in
> > > > > > > from with readXML(fullFilePath), just to a different
filename.
> > The
> > > > program
> > > > > > > breezes right on through with no exceptions, but the file
just
> > isn't
> > > > there!
> > > > > > > >
> > > > > > > > There's data in the DataSet and I have write rights to the
> > > > fullFilePath
> > > > > > > specified.
> > > > > > > >
> > > > > > > > What could be happening and how do I get around it?
> > > > > > > > --
> > > > > > > > Art Cabot
> > > > > > > > Strickland Technical Services, Inc.
> > > > > > > > Augusta, Georgia
> > > > > > >
> > > > > > >
> > > > > > >
> > > > >
> > > >
> > > >
> > >
> >
> >
>
- Next message: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Previous message: Neil Cowburn [MVP]: "Re: Does .net CF support remoting?"
- In reply to: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Next in thread: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Reply: Art Cabot: "Re: writeXML(fullFilePath) DOESN'T Write"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|