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 » U++ Library support » U++ SQL » Error when compiling native MySql with MSC9
Re: Error when compiling native MySql with MSC9 [message #34307 is a reply to message #34302] Thu, 10 November 2011 22:02 Go to previous message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi Mirek,

With your help and suggestions, I succeeded to compile my demo project. I forgot to add "SQL = session" just after getting the connection.

#include "DirectDB.h"

#define IMAGECLASS DirectDBImg
#define IMAGEFILE <DirectDB/DirectDB.iml>
#include <Draw/iml.h>

#define SCHEMADIALECT <MySql/MySqlSchema.h>
#include <Sql/sch_source.h>

DirectDBWin::DirectDBWin()
{
CtrlLayout(*this, "Window title");
if(session.Connect("alexandre","deming","skillsdb","127.0.0.1 ",3306,NULL))
{
PromptOK("Connexion réussie");
SQL = session; (new line)

try
{
SQL &Select(CODE,NAME).From(TBLPROCS);

while(SQL.Fetch())PromptOK(AsString(SQL[0])+" : "+AsString(SQL[1]));
}
catch(SqlExc &ex)
{
PanicMessageBox(t_("Erreur MySql"),t_("L'erreur suivante s'est produite : ")+ex.ToString());
Close();
}
}

else PanicMessageBox("Erreur","Pas de connexion possible");
}

GUI_APP_MAIN
{
SetLanguage(GetSystemLNG());
SetLNGCharset(GetSystemLNG(),CHARSET_UTF8);

DirectDBWin().Run();
}


Really U++ is an amazing tool for C++ development.

I got some difficulties to link with MySql library so I went through ODBC to by-pass use of native MySql. Now all is working perfectly. So I would like to post some help for newbie probably facing the same problems.

Please consider this topic closed.

Thanks again for your help

Regards
Biobytes
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SqlMassinsert
Next Topic: Sqlite Delete not working [SOLVED]
Goto Forum:
  


Current Time: Tue May 14 05:41:16 CEST 2024

Total time taken to generate the page: 0.02561 seconds