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 » SQLCommander make program crash
Re: SQLCommander make program crash [message #17663 is a reply to message #17659] Mon, 25 August 2008 08:32 Go to previous messageGo to previous message
TeCNoYoTTa is currently offline  TeCNoYoTTa
Messages: 138
Registered: July 2008
Location: Egypt
Experienced Member

I use Sqlite3 and in this is the constructer of my window
CISL::CISL()
{
	CtrlLayout(*this, "CISL");
	
	this->WhenClose = THISBACK(Hide);
	this->MinimizeBox();
	///////Opening DataBase

	if (!sqlite3.Open(ConfigFile("simple.db")))
	{
		Exclamation("Can't Open Dataabse");
		return;
	}
	SQL = sqlite3;

	SqlSchema sch(SQLITE3);
	StdStatementExecutor se(sqlite3);
	All_Tables(sch);
	if (sch.ScriptChanged(SqlSchema::UPGRADE))
		Sqlite3PerformScript(sch.Upgrade(),se);
	if (sch.ScriptChanged(SqlSchema::ATTRIBUTES))
	{
		Sqlite3PerformScript(sch.Attributes(),se);
	}
	if (sch.ScriptChanged(SqlSchema::CONFIG))
	{
		Sqlite3PerformScript(sch.ConfigDrop(),se);
		Sqlite3PerformScript(sch.Config(),se);
	}
	sch.SaveNormal();

	tray.WhenBar = THISBACK(TrayMenu);
	btn_download <<= THISBACK(OpenDownloadManager);
	btn_add <<= THISBACK(OpenAddWindow);

	list_items.AddKey();
	list_items.Add("title");
	list_items.Add("Author");
	list_items.Add("Status");

	SQL*Select(SUBJECT_ID,SUBJECT_NAME).From(CIS_SUBJECTS);
	while (SQL.Fetch())
	{
		droplist_subject.Add(SQL[0],SQL[1]);
	}
	SQL*Select(TYPE_ID,TYPE_NAME).From(SUBJECTS_TYPES);
	while (SQL.Fetch())
	{
		droplist_type.Add(SQL[0],SQL[1]);
	}

	/////////////////////////////////////////////////////
	droplist_subject.WhenAction = THISBACK(droplist_change);
	droplist_type.WhenAction = THISBACK(droplist_change);
	//////////////////////////////////////////////
	if (!droplist_subject.IsNullInstance())
		droplist_subject.SetIndex(0);
	if (!droplist_type.IsNullInstance())
		droplist_type.SetIndex(0);
	droplist_change();
	list_items.WhenLeftDouble = THISBACK(OpenItemNotesWindow);
	
	SQLCommander();//This make it crash
}

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Count error
Next Topic: SQL_ProgreSQL example building problems
Goto Forum:
  


Current Time: Fri Aug 15 16:47:59 CEST 2025

Total time taken to generate the page: 0.08301 seconds