Quantcast
Channel: Home of ActiveVFP - Foxpro on the World Wide Web
Viewing all 1109 articles
Browse latest View live

New Post: How to SET PROCEDURE TO?

$
0
0
"Hmm... I had to compile get_vars.prg to make this works.
Why is that? "

The scripts compile automatically as do controllers. Your libraries do not. However, you can use the new CompileIfNew function to automate this part in your code so you don't have to do it manually.
"And why should I complie manualy. Isn't it logical that ActiveVFP compiles every PRG it loads?"
Sure that would be nice too. Why don't you contribute this functionality???

New Post: How to SET PROCEDURE TO?

$
0
0
Sure, I would contibute if I manage to do that.

Actually I developed myself something similar to ActiveVFP years ago, but I find ActiveVFP promising in functionality I did not manage to create, so I am considering to switch to ActiveVFP. However, my web server does compile everything it loads :)

I did try autocompile and it works in some manner, but I get errors as fxp stays locked so compiler cannot replace it. I do use RELEASE PROCEDURE.

Here are two functions I wrote to make it easier to handle loading libraries. Maybe something like that could be included in main code as I guess it is frequently needed.
PROCEDURE LOADLIB
  PARAMETERS pLibName, pLibPath

  IF (! EMPTY (pLibPath))
      mLibName = pLibPath + "\" + pLibName
  ELSE
      mLibName = pLibName
  ENDIF

  IF ! FILE(mLibName +".fxp") OR FDATE(mLibName + ".prg", 1) > FDATE(mLibName + ".fxp", 1) 
    COMPILE mLibName + ".prg"
  ENDIF

  SET PROCEDURE TO (mLibName) ADDITIVE

ENDPROC



PROCEDURE UNLOADLIB
  PARAMETERS pLibName, pLibPath

  IF (! EMPTY (pLibPath))
      mLibName = pLibPath + "\" + pLibName
  ELSE
      mLibName = pLibName
  ENDIF

  RELEASE PROCEDURE (mLibName)

ENDPROC
Thing is, if I use ActiveVFP then most of my code will be in libraries, not scripts, so I have to deal with this fxp file locking.

New Post: How to SET PROCEDURE TO?

$
0
0
"Thing is, if I use ActiveVFP then most of my code will be in libraries, not scripts, so I have to deal with this fxp file locking."
Like I said above THERE IS NO LOCKING if you just RELEASE your library after the run of your code...

RELEASE PROCEDURE oProp.AppStartPath+'prg\pages'

New Post: How to retrieve a file uploaded to the server?

$
0
0
I think what led to a little confusion was the class name AVFPHTTPUpload. I did not realize until I analysed the source code that the upload had already taken place and that the AVFPHTTPUpload class was merely retrieving the data from the Request object. The class itself had nothing really to do with the uploading process. Once I understood that everything else made sense and it works just fine.

Thanks,
Simon

New Post: a tutorial

$
0
0
Hi, I'm still in a learning stage.
The approach from this activeVFP is to Download Demos. Inside that demos, it contains examples.
If you could read the html code and vfp code together, you would able to learn the mixture of both languages.
Therefore, pre-requirement is a little html knowledge, and a better knowledge of vfp, to understanding coding inside.

As for the connection part,
Looks for free asp .net website, uploads the files into the web.
Therefore, pre-requirement, is able to signup a website, and uploads files in web.

That's all. It would work as the demo.


The documentation is under
https://activevfp.codeplex.com/documentation

New Post: Versão do ActiveVFP para Windows Server 2008 R2

$
0
0
Yeah, agree with Claudefox. As long as the working example is working, and remodify in it, then I would learn it parts by parts easily. Of course, get the simple things works first such as,

html interface code, like radio button, check box, ....

and then comes to vfp code mixing with html display.

New Post: Versão do ActiveVFP para Windows Server 2008 R2

$
0
0
Claudefox, goodnight.

The biggest question about changing the version is by reason of this error:

ServerVariables err # = 1925 line = 1466 Unknown Unknown member OREQUEST.1925 OREQUEST member. OREQUEST. NULL. . NULL. . NULL. . NULL. c: \ atrium \ contadigital \ cdweb \ error cdweb.dll '800a0785 '
c: \ atrium \ contadigital \ cdweb \ cdweb.dll
/ contadigital / Default.asp, line 4

and the program line is:

  • AVFPRequest :: ServerVariables


FUNCTION ServerVariables
LPARAMETERS lcName
RETURN THIS.oRequest.ServerVariables (lcName). Item

EndFunc


If I can not solve this problem need to change the version.

Remembering that my server is Windows Server 2008 R2 with IIS 7.5.

Is it possible?

hugs
Fabio Mascarenhas

New Post: Could not display Chinese character

$
0
0
Hi. Just wonder is it the asp problem or the setting problem. Couldn't able to display chinese character. Tried DocType and meta and <html lang> also.

It is just not going to display chinese character. Any Idea?

New Post: Could not display Chinese character

$
0
0
AVFP defaults to using the english foxpro runtime - VFP9RENU.DLL. If using the Chinese language one (you should have a copy of the Chinese runtime dll if you have a copy VFP) doesn't do any good or if this is unrelated to the display of Chinese characters then it must be an HTML problem and not related directly to AVFP. If so, there must be a wealth of info already on the internet that can be googled for this problem

New Post: Versão do ActiveVFP para Windows Server 2008 R2

$
0
0
You're going to have to debug this yourself. I just don't have the time to go line by line through your code.

New Post: Could not display Chinese character

$
0
0
Hi claudefox,

Basically it is display html in chinese problem. Have to google up the solutions.

New Post: How to restart ActiveVFP service from command prompt

$
0
0
I cannot find anywhere info how to restart VisualVFP service from command prompt.

I can do that using Services but it is not quite nice easy to access,.

New Post: How to restart ActiveVFP service from command prompt

$
0
0
If you're talking about ActiveVFP being available - AVFP starts when IIS starts, even if you're logged off.

If you have to restart (ordinarily you don't) because you think something needs to be reset, you can:
1.) recycle the Application Pool in IIS Manager (usually DefaultAppPool). There probably is a simple command you can run for this on the command line but I don't know it off the top of my head.
2.) If you don't mind knocking the whole web server offline, you can always just run iisreset from the command line.

New Post: How to restart ActiveVFP service from command prompt

$
0
0
or

to start:
net start w3svc

to stop:
net stop w3svc

New Post: a tutorial

$
0
0
It is as simple as follow :-
  1. install IIS
  2. install ActiveVFP
  3. make sure sub folder "bin" and "prg" exists in "c:\inetpub\wwwroot\" (if not found then just copy from "AVFPx.xxdemo" folder)
  4. create simple file "test.avfp" in folder "c:\inetpub\wwwroot\" and run from IE : http://localhost/test.avfp
    <html>
    <body>
    VFP Date Function <% =date() %>
    </body>
    </html>
That's all about starting with ActiveVFP. Basic knowledge of html and javascript will be required when develop complete VFP web program.

New Post: How to retrieve a file uploaded to the server?

$
0
0
when I run Upload1.avfp and Upload2.avfp always shows 0 file uploaded and the folder TEMP also empty only.
What could be the reason ? IIS setting or missing class in my AVFP ? please help.

New Post: a tutorial

$
0
0
Thank you for the information . it was much helpful. And i have basic programming knowledge . So will a little about the vfp so that i can do it better. Thank you.

New Post: How to retrieve a file uploaded to the server?

$
0
0
Assuming you chose a file to upload, the Temp folder has to be writable. Check permissions.

New Post: How to SET PROCEDURE TO?

$
0
0
Releasing procedures works fine until code breaks before RELEASE is executed, which is often while you are coding and debugging...

I managed to reduce locking by catching errors in TRY CATCH FINALLY thus forcing releasing procedures even if error occurres. However, I still have situations that fxp stays locked.

New Post: How to SET PROCEDURE TO?

$
0
0
What kind of error specifically? I tested by trying to use a non-existent DBF (USE mydbf.dbf &&table doesn't exist) in pages.prg which generated an error when I ran simplelist.avfp. I then added the following to simplelist.avfp:

SET PROC to oProp.AppStartPath+'prg\CompileIfNew' ADDITIVE
CompileIfNew('pages')
SET PROC to oProp.AppStartPath+'prg\pages' ADDITIVE

I then commented out the USE mydbf.dbf in pages.prg and saved the file (no compile in IDE) and it worked! What's even more surprising is I didn't even have to put the RELEASE PROC in simplelist.avfp. It appears that the CompileIfNew command doesn't suffer any locking at all!?

Please let me know if this works for you.
Viewing all 1109 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>