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 » Two tables sharing same field name?
Re: Two tables sharing same field name? [message #26837 is a reply to message #26836] Tue, 01 June 2010 19:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14267
Registered: November 2005
Ultimate Member
jeremy_c wrote on Tue, 01 June 2010 13:28

I have this simple schema:


TABLE_(MODES)
	STRING_ (NAME, 40) UNIQUE
END_TABLE

TABLE_(BANDS)
	STRING  (NAME, 8) UNIQUE
	DOUBLE_ (FREQ_BEGIN)
	DOUBLE_ (FREQ_END)
END_TABLE


This works fine. However, when I go to insert a name into the mode table that is 8 characters or more, I get an exception. i.e.

SQL & ::Insert(MODES) (NAME, "AMTORFEC");


If I change the above schema to define BANDS/NAME as 40, then the above statement works fine. Put the BANDS/NAME back to 8 and I get the exception. Never fails.

Am I doing something wrong or is this a bug?

Thanks,

Jeremy




My guess is that you are breaking the UNIQUE contraint, SQL statement therefore end with error and exception is raised because you are executing with "&".

Put SQL.SetTrace() into MAIN and examine the log file.

Mirek
 
Read Message
Read Message
Read Message
Previous Topic: ParseForArguments does not take comments in account
Next Topic: Multiple schema files?
Goto Forum:
  


Current Time: Sun Aug 24 07:11:19 CEST 2025

Total time taken to generate the page: 0.04167 seconds