Author Topic: Using Code::Blocks with DBF and DBC files (FoxPro/Dbase/XBase/Foxbase)  (Read 15881 times)

Offline HalfNote5

  • Single posting newcomer
  • *
  • Posts: 5
Hi everyone!

Quick question.  I've got a lot of software written in Visual FoxPro 5 through 9. Still LOVE it for Windows apps, but I'd like to start making all my software cross platform.

Don't get me wrong- wine works great, but I'd like something a little more elegant that doesn't have so much abstraction.  However, I still want to be able to whip up a quick Visual FoxPro module for the Windows users that need a quick customized companion/helper app.

Thus, my question: does anyone have an example or some sample Code::Blocks code of the proper way to access/filter/index/CountTo/ZAP/RestoreDeleted/PACK/SELECT/USE/CLOSE etc. on DBF files from Codelocks?

Thanks!

-Duffy W.

P.S. Development environment is Linux, so if I need to take into account Linux ASCII vs. Windows ASCII, that'd be a helpful tidbit, too, if anyone knows. = )
« Last Edit: April 17, 2008, 04:49:23 pm by HalfNote5 »

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 90
You are confusing a couple of things there, but coming from FoxPro that's not surprising. Code::Blocks is "only" an IDE for several programming languages, C and C++ being the prominent ones. FoxPro is Database application, programming language and IDE in one. The correct question to ask is for sample (eg) C, C++ or Python code to access DBF. And that makes the question not suited for this forum as it has nothing to do with Code::Blocks itself, even less the development of it.
« Last Edit: April 17, 2008, 11:50:08 pm by Belgabor »

Offline HalfNote5

  • Single posting newcomer
  • *
  • Posts: 5
I beg your pardon, and you are, indeed correct.  I tend to associate Code::Blocks with C++ and the WxWidgets/WXSmith IDE/libraries, since that's primarily what I use it for.

Yes, I was in fact wondering whether anyone has any C++ code geared towards headers and libraries already available by default in Code::Blocks. 

(That being why I feel the question is, indeed, apropos for this forum, as I want to do it in a way that is native to the libraries and headers supplied in a standard, unmodified Code::Blocks distribution.)

That way, I don't have to hunt down (and get permission to use) DLL's, applications that act as access modules or any of that extraneous annoyance.

Basically I'm looking for the easiest NATIVE way (in a C/C++ application) to access and work with DBF's, preferably without 3rd party (non-Code::Blocks/WXWidgets) libraries, headers, or apps.

Thanks! And again my apologies for lack of clarity. I phrased the question without thought to the differences in the two IDE's nor the audience to which I was addressing it.

Cheers!

« Last Edit: April 18, 2008, 01:23:23 am by HalfNote5 »

Offline Seronis

  • Almost regular
  • **
  • Posts: 197
What he is trying to say is:  codeblocks doesnt 'have' any libraries.  For the most part C::B doesnt come with anything except for the vista distribution which does automatically include a MinGW  (www.mingw.org) installation by default that had been patched to be vista friendly (at the time, the public official mingw distro didnt work on vista).  But C::B itself doesnt.

Anyways thank you for not taking offense at being corrected but the question is best addressed more appropriately with the site of whichever compiler/library you are using with C::B.

Offline HalfNote5

  • Single posting newcomer
  • *
  • Posts: 5
Ahh! I see.

So I'd probably want to address this to, for example, the WXWidgets community provided I have the WXWidgets headers and libraries appended to C::B, yes?

Being that my C++ compiler for long years now has been the Borland compiler/IDE, I'm not really sure where Code::Blocks and its included prepackaged headers (if any) leaves off and the add-on modules (IE WX/Lightfeather/GTK/Qt) begin.


Sorry for the confusion, and thanks for the enlightenment. I'll be sure to remember that C::B (despite all the cool prepackaged goodies on Ubuntu that it integrates with) is simply the IDE and editor.

Also, if any of you DO have any suggestions for the DBF stuff, I'd be grateful for a gentle nudge in the proper direction.

Thanks!
« Last Edit: April 18, 2008, 03:17:05 am by HalfNote5 »

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 90
http://sourceforge.net/projects/dbase/
http://www.softlookup.com/display.asp?id=304

These are two links I found searching on Google and Sourceforge. I don't know if they are good or even usable, but they should be at least a starting point. If not, try to search on Sourceforge yourself, maybe you find something better :)
If all fails, http://www.wotsit.org/list.asp?fc=6 seems to have a description of the file format.

Offline HalfNote5

  • Single posting newcomer
  • *
  • Posts: 5
Thanks!!

At first blush, they all look like they can get me at least 90% of the way there, and the file format specs mean I can pretty much write my own data access engine in STD C++ if I have to.

Thanks, and sorry for the earlier confusion. I took "Development" to mean development USING C::B, not development OF C::B.

You guys are great, and if I can contribute anything to the forum, I'll certainly do my best when the occasion arises.

Cheers!

-Duffy

P.S. I'm not sure how to "move" a thread in this forum, but if you guys want, you can stick this someplace where it'll help the next person with this issue. Those links are perfect. (To be honest, I'd googled it, but I hadn't thought to check sourceforge.)


Offline troels

  • Multiple posting newcomer
  • *
  • Posts: 71
http://sourceforge.net/projects/dbase/
These are two links I found searching on Google and Sourceforge

Actually no code was to be found in this project - until today!
:-)