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 » Sqlite and DUAL_PRIMARY_KEY
Sqlite and DUAL_PRIMARY_KEY [message #45841] Tue, 12 January 2016 12:56 Go to next message
borbek is currently offline  borbek
Messages: 31
Registered: November 2010
Location: Russia
Member
DUAL_PRIMARY_KEY not work with sqlite:

SQL* alter table GROUPS_RTNG add  GRRT_RL_ID integer, primary key (GRRT_GR_ID, GRRT_RL_ID)
ERROR near ",": syntax error(0): Preparing: alter table GROUPS_RTNG add  GRRT_RL_ID integer, primary key (GRRT_GR_ID, GRRT_RL_ID)

Re: Sqlite and DUAL_PRIMARY_KEY [message #45915 is a reply to message #45841] Mon, 25 January 2016 13:37 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13984
Registered: November 2005
Ultimate Member
Hi,

thanks for pointing that out. It appears that Sqlite3 is not compatible here with the concept of 'schema upgrade'. Not quite sure how to really resolve this issue.

Mirek
Re: Sqlite and DUAL_PRIMARY_KEY [message #46417 is a reply to message #45841] Mon, 09 May 2016 12:34 Go to previous message
busiek is currently offline  busiek
Messages: 64
Registered: February 2011
Location: Poland
Member
However it works when you create tables. Here is my schema upgrading code:
	All_Tables(sch);
	if (sch.ScriptChanged(SqlSchema::SCHEMA))
		Sqlite3PerformScript(sch.Schema());
	if (sch.ScriptChanged(SqlSchema::UPGRADE))
		Sqlite3PerformScript(sch.Upgrade());
	if (sch.ScriptChanged(SqlSchema::ATTRIBUTES))
		Sqlite3PerformScript(sch.Attributes());
	if (sch.ScriptChanged(SqlSchema::CONFIG)) {
		Sqlite3PerformScript(sch.ConfigDrop());
		Sqlite3PerformScript(sch.Config());
	}

Unless you add a primary key on two columns in an existing table it works ok.
Previous Topic: I am trying to have two sqls one to read another to write
Next Topic: Global SqlIds
Goto Forum:
  


Current Time: Sat Jun 15 02:38:36 CEST 2024

Total time taken to generate the page: 0.02455 seconds