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 » Developing U++ » U++ TheIDE and Library: Releases and ChangeLogs » Schema utilities
Re: Schema utilities [message #20697 is a reply to message #20674] Tue, 31 March 2009 22:24 Go to previous messageGo to previous message
rtmex is currently offline  rtmex
Messages: 9
Registered: March 2009
Location: Puebla, MEXICO
Promising Member
Hello

I try what you said, this is my cpp file

#include "creabase.h"

#include <Sql/sch_schema.h>
#include <Sql/sch_source.h>

using namespace Upp;

creabase::creabase()
{
CtrlLayout(*this, "Window title");
}

bool creabase::OpenDB()
{
if(!m_session.Open("host=localhost dbname=test user=postgres password=prueba"))
{
Exclamation(Format("Error in open: %s", DeQtf(m_session.GetLastError())));
return false;
}


#ifdef _DEBUG
m_session.SetTrace();
#endif

SaveFile("estructura.sch", Exportsch(m_session, "test"));
return true;
}


GUI_APP_MAIN
{
creabase dlg;

if(dlg.OpenDB())
{
dlg.Run();
}
}

I'm getting the next error

error: 'Exportsch' was not declared in this scope

I think I have to add an include file but I don't know wich one, I added the Sql and PostgreSQL packages to my program.
I had to put an empty database.sch file because if I didn't, I got an error saying the file does not exist.

I'm also getting this messages when I compile the program

CtrlLib: circular 'uses' chain
CtrlLib: circular 'uses' chain

This is my .h file

#ifndef _creabase_creabase_h
#define _creabase_creabase_h

#include <CtrlLib/CtrlLib.h>
#include <SqlCtrl/SqlCtrl.h>

using namespace Upp;

#define LAYOUTFILE <creabase/creabase.lay>
#include <CtrlCore/lay.h>

#include <PostgreSQL/PostgreSQL.h>
#define SCHEMADIALECT <PostgreSQL/PostgreSQLSchema.h>
#define MODEL <creabase/database.sch>
#include "Sql/sch_header.h"

class creabase : public WithcreabaseLayout<TopWindow> {
public:
typedef creabase CLASSNAME;
creabase();
bool OpenDB();

protected:
PostgreSQLSession m_session;
};

#endif
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: readonly nests
Next Topic: TheIDE: Package highlight experiment
Goto Forum:
  


Current Time: Sun Apr 28 00:49:03 CEST 2024

Total time taken to generate the page: 0.06746 seconds