Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parameter statement not found

Status
Not open for further replies.

corgette

Programmer
Mar 3, 2008
25
GB
One user out of over a hundred and fifty installations gets a "Parameter statement not found" error.

I was also just informed that this has been happening with each years application. (A new independaent version is released each year)

I believe it something on her system that is causing it. It has been happening each year and this year it was installed on a different stand alone PC.

Any ideas or links that can be helpful?

Thanks.
 
Corgette

See my answer above...

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
I got a screen shot but I don't know how to attach it. It was in an email and I put it in a Word Doc.

It appears to be a VFP error before the app is up and running.

I told the user to try to install it in a different folder, and if that fails to try it on another PC.

Will keep all interested informed.

Thanks
 
For attaching a file here at Tek-Tips you need to upload your image, eg to the suggested box.net service, because Tek-Tips does not provide webspace to store uploads. You need to use a http: URL, a file: URL will only work on your computer.

Bye, Olaf.
 
It appears to be a VFP error before the app is up and running.

Check the Windows shortcut they're using to start the app. Sounds like someone has monkeyed with the startup command and added a parameter.
 
It appears to be a VFP error before the app is up and running.

That's EXACTLY what I was describing! hence why the error handler doesn't get triggered - I think it is a slow antivirus program being a bit zealous.


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Griff,

I hope you're right.
I also told them to disable their anti-virus and see what happens.

Thanks.
 
Hmmm, I don't think I would TELL anyone to disable their antivirus, I might suggest it... under controlled conditions... perhaps B-)

I would suggest that, if that seems to work, you get them to make your program an exception to the virus scanner.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Griff,

I agree. I meant they should disable it just to see if it makes a difference. If it does, we'll take it from there.

Regards,
 
corgette, we still can't see your attachment, as we don't have file noparam.doc in c:\!junk\.

Could you please upload the image you embedded in this word doc to box.net or flickr or whatever suits you best and link to that? Otherwise we can't help you further with the error message.

Bye, Olaf.
 
Hi all,

My user finally got back to me and we isloated it a bit.

They are also running some other foxpro based applications.

If they boot the machine in SAFE MODE, my application loads fine.

I left their IT person instructions to use Task Manager to "End Processes" one at a time to see if they can track it down.

Will keep you informed.
 
corgette,

thanks for the update, I'd still like to see the error message you attached with a file:// url. This url will only work for you, for no one else, as a file urlalways points to local drives (even mapped drives, but that doesn't matter mauch), noone else but you can get at the word doc you attached.

If you need help don't on how to use any service like box.net don't hesitate to ask.

Bye, Olaf.
 
Okay, thaat's exactly the text of ERROR 1238. Plus it looks like VFP does display that error within an EXE.

As the config.fpw is the only thing that is evaluated even before a first line of main.prg. If they added a COMMAND = ... to it that could cause the error for example.

Bye, Olaf.
 
This is the contents of the config.fpw included with the install. I doubt they modified it.


SCREEN=OFF
codepage = 1252
TITLE = Viper PP Solutions


Is this file really necessary ?

Corgette
 
I get the exact same screenshot if I compile a main.prg with the only line ERROR 1238 as an exe.

As I doubt you have ERROR 1238 programmed the most probable two possibilites still are, they have a bat/cmd file trying to pass parameters to your exe or the modified the config.fpw to have a command=... line with a call to some function with parameters that has no parameters.

You can exclude the possibility it's the config.fpw by compiling it into your exe. Add it to your project by simply dragging it from a windows explorer to the project manager, it will be under the main tab "Other" within the root node "other files". Make sure it has no "forbidden" sign next to it. If you right click on config.fpw there should be a menu item "Exclude", that would be okay. If there is instead a menu item "Include", then use it to include config.fpw to the compilation.

Add two lines to the config.fpw: ALLOWEXTERNAL=OFF and RESOURCE=OFF. the first one will disallow any additional external config.fpw to take precedence over the included one, the second line will make VFP not use a foxuser.dbf, which may also be a source of problems, eg if it's corrupted.

Now you could also add a parameter statement to your main.prg, and simply check and see if there are any parameters passed in and what they are:

Code:
LPARAMETERS lcPara1, lcPara2, lcPara3, lcPara4

If Pcount()>0
   For lnCount = 1 to PCount()
       lcParameters = lcParameters + ","+Transform(;
          Evaluate("lcPara"+transform(lnCount)))
   Endfor

   MessageBox("These parameters were passed in: "+;
   substr(lcParameters,2)+chr(13)+chr(10)+;
   "This exe should not be called with parameters, "+;
   "it does not accept parameters.")
Endif

This should prevent anything unplanned to happen at start and even if there are parameters passed, you catch up to 4 of them and simply display them. If you see what parameters are passed you may know what was meant to be done with them and it may turn out what they or you forgot.

Bye, Olaf.
 
correction of the start code:

Code:
LPARAMETERS lcPara1, lcPara2, lcPara3, lcPara4

* forgot to define lcParameters
Local lcParameters
* and more important, set it to empty string
lcParameters = ""

If Pcount()>0
   For lnCount = 1 to PCount()
       * this will error otherwise.
       lcParameters = lcParameters + ","+Transform(;
          Evaluate("lcPara"+transform(lnCount)))
   Endfor
   MessageBox("These parameters were passed in: "+;
   SubStr(lcParameters,2)+Chr(13)+Chr(10)+;
   "This exe should not be called with parameters, "+;
   "it does not accept parameters.")
Endif

Bye, Olaf.
 
Olaf,

Thanks for the time and effort.

I added the 2 lines to the config.fpw and included it in the compiled program.

I'll be in touch when I hear from them.

Corgette
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top