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 » Sql Lite schema with DATE type
Sql Lite schema with DATE type [message #51733] Thu, 09 May 2019 11:23 Go to previous message
NattyRoots is currently offline  NattyRoots
Messages: 2
Registered: April 2019
Junior Member
Hello,

I'm trying to create a SQL Lite 3 database where I would store the insertion Date. Here's my current .sch :

TABLE_ (SESSION)
	INT 	(SESSION_ID) PRIMARY_KEY AUTO_INCREMENT
	STRING_ (BATTLETAG, 200)
	STRING_ (DISCORD_NAME, 200)
	STRING_ (RANK, 4)
	DATE_ (DATE_SESSION) SQLDEFAULT(CURRENT_DATE)
END_TABLE


It compiles just fine but when I try to execute any SQL query, I get the following error and my .db file isn't updated :

Assertion failed in C:\UPP\upp-mingw-12999\upp\uppsrc\plugin\sqlite3\Sqlite3upp.cpp, line 270
NULL != current_stmt


I'm updating my .db file using the method found in the SQL Lite 3 reference :

Sqlite3Session sqlite3;
sqlite3.LogErrors(true);
if(!sqlite3.Open(ConfigFile("simple.db"))) {
	Cout() << "Can't create or open database file\n";
	return;
}
				
#ifdef _DEBUG
	SqlSchema sch(SQLITE3);
	All_Tables(sch);
	if(sch.ScriptChanged(SqlSchema::UPGRADE))
		SqlPerformScript(sch.Upgrade());
	if(sch.ScriptChanged(SqlSchema::ATTRIBUTES)) {
		SqlPerformScript(sch.Attributes());
	}
	if(sch.ScriptChanged(SqlSchema::CONFIG)) {
		SqlPerformScript(sch.ConfigDrop());
		SqlPerformScript(sch.Config());
	}
	sch.SaveNormal();
#endif


Is there a special way to deal with date using Sql Lite 3 in U++ ?

Thank you for your help !
 
Read Message
Read Message
Read Message
Previous Topic: Field name same as table name
Next Topic: postgresql mingw
Goto Forum:
  


Current Time: Fri Apr 26 15:52:23 CEST 2024

Total time taken to generate the page: 0.02051 seconds