开发者

foxpro to dbf query

I have foxpro app which uses .dbf as database and generate a .txt file for report printing. is there any way to know what query foxpro app is using for report preparation. I have .prg, .idx, .dbf, .fxp 开发者_StackOverflowand some other files.


  • .prg is the code file
  • .idx is the index
  • .dbf is the table
  • .fxp is the compiled foxpro code.

Your query will be in the prg file - you will need to read through the code - it should be similar to an SQL query (Select...).


You might also find the query in a qpr file. This is a file of SQL which has been created by the FoxPro query builder.

Be aware that FoxPro has many ways of generating text files and might not be using a query at all. Try looking these up in VFP Help or on line:

  • StrToFile
  • SET TEXTMERGE
  • TEXT ... ENDTEXT
  • FOPEN, FWRITE, FPUT
  • COPY TO ... TYPE CSV


Additionally...

.scx and .sct are paired files used for forms, and within them could be methods, like on buttons to actually run the queries.

likewise with .vcx and .vct are paired files used for class libraries which could also hold code depending on how the app was constructed.


If it's FoxPro/DOS then you can have 'screens' defined in paired .SCX/.SCT files. These are used to auto-generate program code. These are just .DBF files with a different extension, you can open and browse them etc. The controls on these screens have code 'snippets' behind them.

You also have standard .PRG files which have plain old program code.

Assuming this application is built as part of a project then at build time the screens generate a temporary .PRG file, which is then compiled into the overall .APP or .EXE, and the code in .PRG goes into the .APP or .EXE in a compiled form too.

So your code that generates the report output either lives in a screen 'snippet', which is effectively like method code, or in a plain PRG file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜