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 » Separate Database Access code
Re: Separate Database Access code [message #38834 is a reply to message #38832] Mon, 21 January 2013 17:33 Go to previous messageGo to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Thanks for the help ! Smile

Yes, this fixes the problem. I should have test this !

But I don't like this solution, as - if I understand well - SQL is global and can be used anywhere. As the applications that will use the lib could use a second database, and want to use SQL global variable for this second database, I didn't want to use it.

Instead of using SQL, I tried :

void libDB::InitDB()
{
	LOG("Open DB");
	if(!lDB.Open(ConfigFile("libDB.db"))) {
		Exclamation(t_("Cannot create or open libDB database file\n"));
		return;
	}
	LOG("SqlSchema");
	SqlSchema sch(SQLITE3);
	
	Sql sql(lDB);

but I always get an invalid memory access error...

Is there a way to have this working without using SQL ?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: How to Draw without overriding Paint?
Next Topic: Deploying U++ Application
Goto Forum:
  


Current Time: Thu Apr 25 02:07:13 CEST 2024

Total time taken to generate the page: 0.03827 seconds