Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Temporary Files - where should I put them
Message
 
To
13/12/2001 09:14:15
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
00593753
Message ID:
00593848
Views:
26
This message has been marked as a message which has helped to the initial question of the thread.
You may want to try something closer to:
   FUNCTION GETDATA(lcStr as string) AS String
   LOCAL lcRetVal as String
   SELECT * from C:\INETPUB\WEBPUB\PHONE.DBF WHERE name=lcStr INTO CURSOR result
   IF _TALLY>0
      CURSORTOXML('Result','C:\INETPUB\WEBPUB\DiskFile.xml', 1, 8, 0, "1")
      lcRetVal=FILETOSTR("C:\INETPUB\WEBPUB\DiskFile.xml")
   ELSE
      lcRetVal="No Records Returned" && Or something more descriptive
   ENDIF
   RETURN lcRetVal
BTW: It would be better if, rather than hard coding the temp file location, you extracted the Windows temp file location from the registry and used that. This way, you won't get into trouble when it's moved to another machine.

Disclaimer: I haven't tested this at all, just interpreting the syntax in the help file.

HTH

>Thanks Alex
>
>I am pretty well doing what you advise already, it is my COM object that is having the trouble.
>Here is my method (It is just a test method)
>
>
>        FUNCTION GETDATA(lcStr as string) AS String
>        LOCAL lcRetVal as String
>        SELECT 0
>        SELECT * from C:\INETPUB\WEBPUB\PHONE.DBF WHERE name=lcStr INTO TABLE C:\INETPUB\WEBPUB\result
>        *SET FILTER TO NAME=lcStr
>        *CURSORTOXML('PHONE','lcRetVal', 1, 8, 0, "1")
>        DO (_GENHTML) WITH "C:\INETPUB\WEBPUB\PHONE.HTM","result"
>        lcRetVal=FILETOSTR("C:\INETPUB\WEBPUB\PHONE.HTM")
>        RETURN lcRetVal
>
>It is the files created by my method that seem to be the problem
>This method can see the PHONE.DBF but can not see the
>C:\INETPUB\WEBPUB\PHONE.HTM
>file in spite of my being able to see it in file manager.
>
>I am pretty sure I am putting all my files in the wrong places because I can not find any documentation on where they are all supposed to live:(
>
>Thanks for all this help. Your points score must have rocketed of late with all the points I have been awarding you:)
>
>
>
>
>>Hi Mark you don't need to create a file for that if your web service returns the html then you can do the following:
>>
>>lchtml = losoap.MyWebServiceMethod()
>>Response.Write lchtml
>>
>>>I have created a web service that does a select into a cursor and then runs GENHTML.prg on the cursor and then FILETOSTR on the output ogf GENHTML.
>>>
>>>I am now getting file does not exist when I call my WS from an ASP page.
>>>where is the best place to put my temporary files to ensure that they are seen when called from a browser.
>>>
>>>So far I have tried putting them in the c:\temp\ folder on the workstation that has IIS installed and also putting them in my C:\INETPUB\WEBPUB\ folder
>>>
>>>Many thanks
Kogo Michael Hogan

"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?

Ideate Web Site
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform