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

Help to convert VB to VFP...

Status
Not open for further replies.

cnguyen

Programmer
Dec 15, 2002
21
0
0
US
I'm trying to get these line of codes below from VB to work in VFP, I need help to convert it... thanks..
VB codes:
SGDB1.ConnectToDB "SysGal", "", ""
SGDB1.OperatorSignOn "TEST", "TEST"
Dim obj As ICCardData
Set obj = SGDB1.GetCardRecordSet"", "", "", "LAST_NAME,FIRST_NAME"

VFP codes:
SGDB1.ConnectToDB("SysGal", "", "")
SGDB1.OperatorSignon("TEST", "TEST")
DIM OBj as THISFORM
OBJ = SGDB1.GetCardRecordSet("", "", "", "LAST_NAME,FIRST_NAME")

thisform have all the properties match with ICCARDATA...
 
cnguyen

It would be difficult to do, unless you explain what each line is suppose to do.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
cnguyen,

I agree with Mike Gagnon. Rather than asking us to translate specific lines of code, it would be better if you could explain what you overall goal is. We might then be able to help you achieve that goal in VFP?

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
You got close, cnguyen,
You just don't need to "DIM" variables in VFP
so take out the line:
DIM OBj as THISFORM

I do agree with Mike and Mike that knowing your overall purpose might lead to more vfp-like ways of doing things (it's not always best (fastest, easiest, etc) to simple convert straight from VB to VFP)

- Bill

Get the best answers to your questions -- See FAQ481-4875.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top