> Salut, > > this is my code (I added the line numbers) > Exist says OK > but the File.Load fails with : File or directory does not exist > > args[0] = Reports/US-presidents-3.xml is a relative path > If I use the Fullpath it works. > > AND: this only happens if the code is used in a component ! > In the project-code it works. > > 807 IF Exist(args[0]) THEN > 808 > 809 sString = File.Load(args[0]) > > This I get if I run it : > > args[0] = Reports/US-presidents-3.xml > > CLogic.FromXML.809: #45: File or directory does not exist >
A relative path is resolved inside the project. So if you use your project as a component, the file must be inside the component, otherwise it won't work. If you want a component to access a file located inside the project that uses this component, there is a trick: starting the relative path with "../". But Exist() should be coherent with File.Load(), so can you send me the code, so that I have a clear view of what you do? Regards, -- Benoît Minisini ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user