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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP8 to VFP6

Status
Not open for further replies.

sqlpro

Programmer
Dec 30, 2003
297
NZ
hi friends

I have a program in VFP8 and i want use same program in VFP6 but i am getting errors while running it.
i know that i can put breakpoint and findout possible conflicts.
i am wondering is there any better to achieve it ?
Thanks.

cheers
 
by the way the following code works vfp8 but not in vfp 6
Code:
IF TYPE(FIELD("PKFLD"))='L' THEN 
<<my code here>>
ENDIF

the error is
Function argument value, type, or count is invalid (Error 11)

Thanks

cheers
 
IF TYPE(FIELD("PKFLD"))='L'

The inner Function FIELD() expression looks wrong.

From the VFP7 Help File:
FIELD(nFieldNumber [, nWorkArea | cTableAlias])

As the first parameter, you appear to be using a Character string rather than a Numeric value.

Good Luck,
JRB-Bldr
 
Thanks JRB-Bldr

i solved it by changing it to
IF TYPE("PKFLD")='L'
but i get error on following(i.e syntax error)

Code:
	INSERT INTO  curFinalResult (ParentTab,Parentfld,ChildTab,ChildFld,OrphChdKey,added) ;
  		SELECT distinct lcTable,lcParentfld,lcChild,lcChildfld,&lcChildfld,0 FROM &lcChild ;
  		WHERE  &lcWHERE ;
		NOT in (SELECT &lcParentfld FROM  &lcTable)

here lcTable="ABOPER"
lcchild="PROCPAT"
lcWHERE ="ABOPER"



cheers
 
actually i am wanting find out possible conflicts between
VFP8 code to VFP6 code.
is there any program available like that ?
Thanks

cheers
 
INSERT INTO Foo SELECT Blah

is not supported in VFP6. (Or 7!) It's a brand-spanking new feature of VFP8.

The only way to find out what isn't supported is to try it and see.
 
Thanks danfreeman
may b i need to find out other way to achieve what i want.

cheers
 
ok i tried like following
Code:
SELECT distinct lcTable,lcParentfld,lcChild,lcChildfld,&lcChildfld,0 FROM &lcChild ;
WHERE  &lcWHERE NOT in (SELECT &lcParentfld FROM  &lcTable) into cursor curTemp

select curFinalResult 

append from dbf("curTemp")

but it creates an empty record in curFinalResult
even though there is valid record in curTemp
any ideas plz?

cheers
 
I guess you could start by reading all the "What's New" entries in the VFP 7.0 and 8.0 help files, or you could get the books of the same names at (i.e. and
Ultimately, Dan's idea is the only one that makes sense though - the compiler "knows" what it doesn't like!

Have you picked up the utility to "fix" the Menu (.MNX & MNT) files?

Out of curiousity - Why would you want to "downgrade" a working application?

Rick
 
Hi Rick
actually my program does some data checking.we have some
clients who r running on vfp6 builds.
and we wanted run the program on these client sites and i'm
running into all these issues.

anyway thanks for ur Links :)

cheers
 
You can install both the VFP 6.0 and 8.0 runtimes on the user's systems - there are no conflicts.

Rick
 
actually this program is for our internal testing so clients
may not allow new installations.
by the way Rick u have any idea blank records i mentioned
in my last post plz

cheers
 
I think you're trying to solve the wrong problem.

You should be coding in VFP6 to begin with if that's where your code will run. Working with the HIGHEST common denominator is rarely a good idea.
 
Hi Dave
Thanks for ur post.i tried ur idea but did not work.
finally i ended up copying data to a text file and appending my final cursor from that text file and it works
Thanks.

cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top