Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » [SOLVE] Compile Error for OleDB with MSC9 Compiler
[SOLVE] Compile Error for OleDB with MSC9 Compiler [message #38736] Fri, 11 January 2013 05:45 Go to next message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
I am trying to connect to MS Access DB using OleDB.


attached is the project and the database both in as Access mdb format and in SQLite3. SQLite3 is easy and works straight away. but cant get the Access DB to work. I read in a thread that to connect to AccessDB use OleDB. and other post that says MINGW doesnt work and did not work for me either. Another post suggesting that MSC works with OleDB. unfortunately there is no example of use of OleDB in Example section.



On Debug mode gets these following linking error.

----- SQLTestProj001 ( GUI MAIN MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (11 / 11)
Linking...
main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Upp::OleDBSession::~OleDBSession(void)" 
	(??1OleDBSession@Upp@@UAE@XZ) referenced in function "public: __thiscall mywindow::mywindow(void)" (??0mywindow@@QAE@
	XZ)
main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall Upp::OleDBSession::Open(class Upp::String)"
	 (?Open@OleDBSession@Upp@@QAE_NVString@2@@Z) referenced in function "public: __thiscall mywindow::mywindow(void)" (??
	0mywindow@@QAE@XZ)
main.obj : error LNK2019: unresolved external symbol "public: __thiscall Upp::OleDBSession::OleDBSession(void)" (??0OleDB
	Session@Upp@@QAE@XZ) referenced in function "public: __thiscall mywindow::mywindow(void)" (??0mywindow@@QAE@XZ)
J:\Out\MyApps\SQLTestProj001\MSC9.Debug.Debug_Full.Gui.Main\SQLTestProj001.exe : fatal error LNK1120: 3 unresolved extern
	als

There were errors. (0:01.01)




if compiled in optimal mode as suggested here, get the following errors instead.

----- Sql ( GUI MSC9 BLITZ WIN32 MSC ) (10 / 11)
BLITZ: Session.cpp Script.cpp MassInsert.cpp SqlSchema.cpp util_td.cpp IntroSch.cpp ExportSch.cpp
c:\upp\uppsrc\richtext\txtop.cpp(54) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x6DFF4F50:0x0000002C]', line 182)
 To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++ 
 Help menu, or open the Technical Support help file for more information
Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\Bin\cl.exe.  You will be prompted to sen
	d an error report to Microsoft later.



regards
Navi

[Updated on: Fri, 11 January 2013 08:19]

Report message to a moderator

Re: Compile Error for OleDB with MSC9 Compiler [message #38737 is a reply to message #38736] Fri, 11 January 2013 06:01 Go to previous messageGo to next message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
#include <CtrlLib/CtrlLib.h>

using namespace Upp;

struct mywindow : TopWindow{
	mywindow(){
	     HCenterPosZ(500).VCenterPosZ(600);			
	}	
};

GUI_APP_MAIN
{
	mywindow m;	
	m.Run();
}



Even the simple code above fails gloriously in MSC9 with the following error!

----- CtrlLib ( GUI MSC9 BLITZ WIN32 MSC ) (1 / 9)
----- CtrlCore ( GUI MSC9 BLITZ WIN32 MSC ) (2 / 9)
----- Draw ( GUI MSC9 BLITZ WIN32 MSC ) (3 / 9)
----- plugin/bmp ( GUI MSC9 BLITZ WIN32 MSC ) (4 / 9)
----- RichText ( GUI MSC9 BLITZ WIN32 MSC ) (5 / 9)
BLITZ: Object.cpp ParaPaint.cpp TxtData.cpp TxtPaint.cpp TxtOp.cpp Format.cpp TableCell.cpp TableLayout.cpp TablePaint.cp
	p TableData.cpp TextPaint.cpp TextStyle.cpp TextData.cpp TextTable.cpp EncodeHTML.cpp Util.cpp
----- Core ( GUI MSC9 BLITZ WIN32 MSC ) (6 / 9)
BLITZ: Mt.cpp Bom.cpp Path.cpp NetNode.cpp App.cpp Log.cpp Debug.cpp Random.cpp LocalProcess.cpp Value.cpp ValueUtil.cpp 
	Lang.cpp LangInfo.cpp JSON.cpp z.cpp Topic.cpp CoWork.cpp MD5.cpp SHA1.cpp InetUtil.cpp Socket.cpp Http.cpp Dli.cpp W
	in32Util.cpp
----- plugin/z ( GUI MSC9 BLITZ WIN32 MSC ) (7 / 9)
----- plugin/png ( GUI MSC9 BLITZ WIN32 MSC ) (8 / 9)
----- MSC_TestAPP001 ( GUI MAIN MSC9 BLITZ WIN32 MSC ) (9 / 9)
$blitz.cpp
c:\upp\uppsrc\richtext\txtop.cpp(54) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x6DFF4F50:0x0000002C]', line 182)
 To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++ 
 Help menu, or open the Technical Support help file for more information
Internal Compiler Error in C:\Program Files (x86)\Microsoft Visual Studio 9.0\Vc\Bin\cl.exe.  You will be prompted to sen
	d an error report to Microsoft later.
main.cpp
MSC_TestAPP001: 1 file(s) built in (0:00.44), 440 msecs / file, duration = 1388 msecs, parallelization 91%
RichText: 16 file(s) built in (0:01.02), 64 msecs / file, duration = 2590 msecs, parallelization 81%
$blitz.cpp
Core: 24 file(s) built in (0:01.85), 77 msecs / file, duration = 3447 msecs, parallelization 60%

There were errors. (0:03.77)



however, builds and runs in Debug mode!?

----- CtrlLib ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (1 / 9)
----- CtrlCore ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (2 / 9)
----- Draw ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (3 / 9)
----- plugin/bmp ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (4 / 9)
----- RichText ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (5 / 9)
----- Core ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (6 / 9)
BLITZ: Cpu.cpp Mt.cpp sheap.cpp String.cpp WString.cpp StrUtil.cpp Bom.cpp Path.cpp NetNode.cpp App.cpp Stream.cpp BlockS
	tream.cpp Log.cpp Debug.cpp Util.cpp mathutil.cpp Random.cpp LocalProcess.cpp Vcont.cpp Hash.cpp Callback.cpp TimeDat
	e.cpp OldValue.cpp Value.cpp ValueUtil.cpp Format.cpp Convert.cpp Color.cpp Gtypes.cpp t.cpp Lang.cpp LangInfo.cpp pa
	rser.cpp XML.cpp Xmlize.cpp JSON.cpp Uuid.cpp Ptr.cpp z.cpp Topic.cpp CoWork.cpp MD5.cpp SHA1.cpp InetUtil.cpp Socket
	.cpp Http.cpp Dli.cpp Win32Util.cpp
----- plugin/z ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (7 / 9)
----- plugin/png ( GUI MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (8 / 9)
----- MSC_TestAPP001 ( GUI MAIN MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (9 / 9)
$blitz.cpp
main.cpp
MSC_TestAPP001: 1 file(s) built in (0:01.37), 1375 msecs / file, duration = 2839 msecs, parallelization 69%
Core: 48 file(s) built in (0:02.11), 44 msecs / file, duration = 3604 msecs, parallelization 55%
Linking...
J:\Out\MyApps\MSC_TestAPP001\MSC9.Debug.Debug_Full.Gui.Main\MSC_TestAPP001.exe (4574720 B) linked in (0:05.30)

OK. (0:05.44)




also the MXC9X64 compiler seems to have no problem compiling the app in optimal mode.


----- CtrlLib ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (1 / 9)
----- CtrlCore ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (2 / 9)
----- Draw ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (3 / 9)
----- plugin/bmp ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (4 / 9)
----- RichText ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (5 / 9)
----- Core ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (6 / 9)
----- plugin/z ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (7 / 9)
----- plugin/png ( GUI MSC9X64 SHARED BLITZ WIN32 MSC ) (8 / 9)
----- MSC_TestAPP001 ( GUI MAIN MSC9X64 SHARED BLITZ WIN32 MSC ) (9 / 9)
J:\Out\MyApps\MSC_TestAPP001\MSC9x64.Blitz.Gui.Main.Shared\MSC_TestAPP001.exe (1422848 B) is up to date.

OK. (0:00.14)

[Updated on: Fri, 11 January 2013 06:08]

Report message to a moderator

Re: Compile Error for OleDB with MSC9 Compiler [message #38740 is a reply to message #38737] Fri, 11 January 2013 08:19 Go to previous messageGo to next message
omari is currently offline  omari
Messages: 264
Registered: March 2010
Experienced Member
Hi,


Quote:


----- SQLTestProj001 ( GUI MAIN MSC9 DEBUG DEBUG_FULL BLITZ WIN32 MSC ) (11 / 11)
Linking...
main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall Upp::OleDBSession::~OleDBSession(void)"
...



you have to add OleDB package to your package .

Regards,
omari


regards
omari.
Re: Compile Error for OleDB with MSC9 Compiler [message #38741 is a reply to message #38740] Fri, 11 January 2013 08:23 Go to previous messageGo to next message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
Very Happy Ya just realize that and added it. it works!! hurry!!

For the other problem with MSC9 is just weird. any way downloaded the Windows SDK7.1 which has the MSC10 Works. so all good for now.


Thanks omari.

regards

Navi
Re: [SOLVE] Compile Error for OleDB with MSC9 Compiler [message #38742 is a reply to message #38736] Fri, 11 January 2013 09:12 Go to previous messageGo to next message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
For all those who are still looking for a example of OleDB connecting to MS Access DB. Attached project is a working example.


You will need MSC10
Microsoft Windows SDK 7.1 Web Installer [498 KB]
Microsoft Windows SDK 7.1 ISO image file [567.3 MB]

[Updated on: Fri, 11 January 2013 09:19]

Report message to a moderator

Re: [SOLVE] Compile Error for OleDB with MSC9 Compiler [message #38743 is a reply to message #38736] Fri, 11 January 2013 09:13 Go to previous message
navi is currently offline  navi
Messages: 107
Registered: February 2012
Location: Sydney, Australia
Experienced Member
Screen Cap

index.php?t=getfile&id=4012&private=0
Previous Topic: How to update the GUI during a long calculation?
Next Topic: Vertical tabs in U++
Goto Forum:
  


Current Time: Fri Mar 29 12:10:29 CET 2024

Total time taken to generate the page: 0.00980 seconds