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!

converting FoxPro 2.6a problem 1

Status
Not open for further replies.

meldrape

Programmer
May 12, 2001
516
US
Hi,

I have a FoxPro 2.6a app I'm converting to Access 2000. I've converted the database and all but one of the screens. I know zero about Foxpro but have managed to figure out and recreate all screens to forms, queries, etc. I'm stuck on one screen. How do I go about finding the query behind this screen? What is the extension of the file that has the guts that the screen pulls from? How do I view it? I have Foxpro 2.6a for windows running on an old Windows 998 box. It's the only screen out of 14 that I can't quite get right. After that, I'm home free. Any thoughts would be greatly appreciated. Thanks.
 
Foxpro 2.6 and Access are entirely different. While both use SQL, Access is object oriented and Foxpro 2.6 isn't. Because of that, you will probably find the source of the data buried somewhere in the code. There's no RecordSource, ControlSource, or RowSource in FoxPro 2.6. If you are willing to email me a copy of the file, I'll look at it and see if I can figure it out. Ironically, I am much more versed in FoxPro than Access. I have over 15 years experience with FoxPro and only recently started writing Access code. I'm sure that we can figure it out if you send the file to me. If you don't mind, I'd rather reply to your email than to post my email address on here. Thanks.

dz
 
That sounds great except it's so big. I wouldn't even know what file to send you there are so many.

confused@clickfocal.com

I suppose I could zip it and download it to my web site...

Thanks.

 
Screen files in Fox are just .DBF tables with a .SCX extension. You can open them up and BROWSE them in Fox by doing the following in a command window:

USE ScrnFile.SCX &&... must use the .SCX extension
BROWSE

This table contains all the items displayed in the screen layout form.
Look in the 'Name' memo field (use CTRL + ENTER to open Memo fields with a capital 'M') for a file name with a .DBF extension. I believe it will be contained in the record with an 'objtype' of 2. The dbf is the underlying table for the screen data display. However, if the data source for the table is a cursor from a query or whatever, you won't be able to find it without going into the code itself.

Dave S.
 
Hi!

"How do I go about finding the query behind this screen?"

Here's a kinda wacky idea...look for some unique words that are visible in the screen itself (not data values). Use WINDOWS FIND.EXE (u no right click on START - try limiting it to the folder where u thing the code *might* be) and have WINDOWS look for those (on screen) words.

In the "results window" you are looking for a file with the file extention ".SPR"

If you get a hit, try opening *that* file in FoxPro as a "Program" type (File -> Open -> THAT_FILE.SPR)

As this file is just a text file, you can also open it with NOTEPAD.EXE

Next you will be using the Search feature (Cntrl+F in Fox, or Find/Search - whatever - in the text editing program) to look for the Query string.

You must search on at least the 1st 4 letters of the query command ie "SELE"

Note: this can also be confused with "SELECT a_dbf" so keep hunting if you don't find it right away. You're looking for something like....

SELECT * ;
FROM a_dbf

Of course all of this is a mute point if you don't have the original source code.

Let us know how you make out, FoxFriends are BestFriends!

Regards - Wayne@home

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top