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 » Global SqlIds
Re: Global SqlIds [message #46553 is a reply to message #46537] Wed, 25 May 2016 14:10 Go to previous messageGo to previous message
BioBytes is currently offline  BioBytes
Messages: 307
Registered: October 2008
Location: France
Senior Member
Hi Mirek,

Thank you for sending some time to reply to such obvious question Embarassed

My mistake was to make confusion with Pascal.

Sorry to insist but I have some difficulty with declaration of SqlId Sad

I tried this code in a IVDCommon.h header.

#ifndef _IVDCommon_IVDCommon_h
#define _IVDCommon_IVDCommon_h

extern SqlId DIRTBL,ALL,ID,PART,
      DIRINDEX,SUBINDEX,LIBELLE,
      NORMTBL,IDNORM,NORMTITLE,NORMTYPE,
      HARMONIZED,STATUS,NORMCODE,
      STATTBL,IDST,DESIGN,
      NORMTPTBL,IDTYPE,STANDTYPE,
      DEVTBL,IDDEVI,NAMEDEV,REFDEV,DESDEV,
      CLASSDEV,CONFDEV,AFFDEV,STATUSDEV,
      AFFTBL,IDAFF,NAMEAFF,IDSTD,IDDIR,
      DOCTBL,IDDOC,IDDEV,IDDIRD,NAMEDOC,DESDOC,TYPEDOC,
      HISTOTBL,IDH,IDDEVH,MODIF,DATEMODIF,RESPMODIF,
      CLASSTBL,IDCLAS,NAMECLASS,
      CONFTBL,IDCONF,NAMECONF,
      SIGNTBL,IDSIGN,LOGON,FIRSTNAME,LASTNAME,SIGNNAME;
#endif


For the cpp files, here is the example of the main cpp file (of course IVDCommon.h is added in main header Very Happy

IVDManager::IVDManager()
{
	CtrlLayout(*this, t_("Outil gestion Exigences Essentielles 16.03"));
	Icon(IVDImages::IvdMain);
	SetRect(10,10,GetScreenSize().cx-150,GetScreenSize().cy-100);
	CenterScreen().Sizeable().Zoomable();
	
	IvdBackImg.Set(IVDImages::IvdLogo);
		
	AddFrame(IvdMenuBar);
	AddFrame(IvdToolBar);
	AddFrame(TopSeparatorFrame());	
	
	IvdImageDisplay.setConnectionStatus(false);
	IvdImageInfoCtrl.Set(PaintRect(IvdImageDisplay));
	IvdStatusBar.AddFrame(IvdImageInfoCtrl.Left(30));
	IvdStatusBar.Set(0,t_("Pas de connexion en cours"),150);
	
	AddFrame(IvdStatusBar);
	AddFrame(BottomSeparatorFrame());
	
	IvdMenuBar.Set(THISBACK1(IvdSetMainMenu,false));
	WhenClose = THISBACK(IvdQuitApp);
	
	SqlId DIRTBL("DIRECTIVE"),ALL("*"),ID("ID"),PART("PART"),
      DIRINDEX("DIRINDEX"),SUBINDEX("SUBINDEX"),LIBELLE("LIBELLE"),
      NORMTBL("NORMES"),IDNORM("IDNORM"),NORMTITLE("NORMTITLE"),NORMTYPE("NORMTYPE"),
      HARMONIZED("HARMONIZED"),STATUS("STATUS"),NORMCODE("NORMCODE"),
      STATTBL("STATUSDES"),IDST("IDST"),DESIGN("DESIGNATION"),
      NORMTPTBL("NORMETYPE"),IDTYPE("IDTYPE"),STANDTYPE("STANDTYPE"),
      DEVTBL("DEVICES"),IDDEVI("IDDEV"),NAMEDEV("NAMEDEV"),REFDEV("REFDEV"),DESDEV("DESDEV"),
      CLASSDEV("CLASSDEV"),CONFDEV("CONFDEV"),AFFDEV("AFFDEV"),STATUSDEV("STATUSDEV"),
      AFFTBL("AFFECTATION"),IDAFF("IDAFF"),NAMEAFF("NAMEAFF"),IDSTD("IDSTD"),IDDIR("IDDIR"),
      DOCTBL("DOCUMENTS"),IDDOC("IDDOC"),IDDEV("IDDEV"),IDDIRD("IDDIR"),NAMEDOC("NAMEDOC"),DESDOC("DESDOC"),TYPEDOC("TYPEDOC"),
      HISTOTBL("HISTORIQUE"),IDH("IDH"),IDDEVH("IDDEV"),MODIF("MODIF"),DATEMODIF("DATEMODIF"),RESPMODIF("RESPMODIF"),
      CLASSTBL("CLASSES"),IDCLAS("IDCLAS"),NAMECLASS("NAMECLASS"),
      CONFTBL("CONFORMITY"),IDCONF("IDCONF"),NAMECONF("NAMECONF"),
      SIGNTBL("SIGN"),IDSIGN("IDSIGN"),LOGON("LOGON"),FIRSTNAME("FIRSTNAME"),LASTNAME("LASTNAME"),SIGNNAME("SIGNNAME");
}

GUI_APP_MAIN
{
	String LNGStr = Tokenize2(LNGAsText(GetSystemLNG())," ");
	SetLanguage(LNGFromText(LNGStr));
	SetLNGCharset(LNGFromText(LNGStr),CHARSET_UTF8);
	
	IVDManager().Run();
}


When building the project, the compiler complains that "DIRTBL,ID,PART,
DIRINDEX,SUBINDEX,LIBELLE,
NORMTBL,IDNORM,NORMTITLE,NORMTYPE,
HARMONIZED,STATUS,NORMCODE,
STATTBL,IDST,DESIGN,
NORMTPTBL,IDTYPE,STANDTYPE,
DEVTBL,IDDEVI,NAMEDEV,REFDEV,DESDEV,
CLASSDEV,CONFDEV,AFFDEV,STATUSDEV,
AFFTBL,IDAFF,NAMEAFF,IDSTD,IDDIR,
DOCTBL,IDDOC,IDDEV,IDDIRD,NAMEDOC,DESDOC,TYPEDOC,
HISTOTBL,IDH,IDDEVH,MODIF,DATEMODIF,RESPMODIF,
CLASSTBL,IDCLAS,NAMECLASS,
CONFTBL,IDCONF,NAMECONF,
SIGNTBL,IDSIGN,LOGON,FIRSTNAME,LASTNAME,SIGNNAME" are duplicated (!).

Sorry to bother you with this question but I am a bit lost

Regards
Biobytes
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sqlite and DUAL_PRIMARY_KEY
Next Topic: [solved]crash when execute sql command
Goto Forum:
  


Current Time: Sun May 12 12:44:09 CEST 2024

Total time taken to generate the page: 0.02458 seconds