|
|
Home » Extra libraries, Code snippets, applications etc. » U++ users applications in progress and useful code snippets, including reference examples! » Read a DBF file
|
|
|
Re: Read a DBF file [message #8491 is a reply to message #8488] |
Tue, 13 March 2007 18:08 |
victorb
Messages: 78 Registered: December 2005 Location: Nice, France
|
Member |
|
|
I think the issue is with TCore that contains experimental code that might be sync'ed with other code.
I was able to compile it with MinGW & XP by doing the following modifs:
l 120, 121 (add "UPP")
T *Get(const Value& v) { return UPP::IsNull(v) ? 0 : Rep::Cast(v.GetVoidPtr())->Get(); }
static T *Extract(const Value& v) { return UPP::IsNull(v) ? 0 : Rep::Cast(v.GetVoidPtr())->Get(); }
l 407-411 (comment out)
//template <class T>
//class UPP::RefCon;
//template <class T>
//class UPP::RefPtr;
Hope this help
[Updated on: Tue, 13 March 2007 18:11] Report message to a moderator
|
|
|
|
Re: Read a DBF file [message #9173 is a reply to message #8221] |
Thu, 19 April 2007 22:46 |
Sbleck
Messages: 16 Registered: April 2007 Location: Brazil
|
Promising Member |
|
|
Hi,
Please, HELP other newbie !
#include <Core/Core.h>
#include <Core/dbf.h>
using namespace Upp;
CONSOLE_APP_MAIN
{ int i;
DbfStream dbf;
if(!dbf.Open("C:\\Temp\\numteus\\cntr.dbf", false) ) {
return;
}
int NFields = dbf.GetFieldCount();
while(dbf.Fetch()) {
String text;
for (i=0; i<NFields; i++) {
text << dbf[i] << " # ";
}
text << "\n";
Cout() << text;
}
dbf.Close();
}
I tried to put dbf.h in any possible place (under C:\upp), but nothing could produce other result than THIS:
----- CtrlLib ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (1 / 9)
----- CtrlCore ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (2 / 9)
----- RichText ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (3 / 9)
----- Draw ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (4 / 9)
----- Core ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (5 / 9)
----- plugin/bmp ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (6 / 9)
----- plugin\z ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (7 / 9)
----- plugin\png ( CONSOLE MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (8 / 9)
----- DBF_Reader ( CONSOLE MAIN MSC8 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (9 / 9)
main.cpp
C:\upp\MyApps\DBF_Reader\main.cpp(2) : fatal error C1083: Cannot open include file: 'Core/dbf.h': No such fil
e or directory
DBF_Reader: 1 file(s) built in (0:01.20), 1203 msecs / file, duration = 1234 msecs
There were errors. (0:01.78)
Anibody with good will could explain how should I configure "these" include files, to get rid of these problems ? ANY HELP could be GREATLY appreciated, of course...
Regards,
Sven
|
|
|
|
|
|
Goto Forum:
Current Time: Fri Nov 01 01:30:47 CET 2024
Total time taken to generate the page: 0.02143 seconds
|
|
|