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 » SqlSelect::AsTable()
SqlSelect::AsTable() [message #57534] Fri, 17 September 2021 15:20
mubeta is currently offline  mubeta
Messages: 77
Registered: October 2006
Member
In file SqlStatement.cpp, this method: SqlStatement() seems to me that it consider the runtime app declared for use a single databae. In fact it seems to me that if is use two databases, for example one Sqlite3 and one in MySQL, this method in MySql don't run as well.

For now I modified it in this way:
SqlSet SqlSelect::AsTable(const SqlId& tab, int dialect) const
{
	StringBuffer t;
	if(dialect == MSSQL || dialect == PGSQL || dialect == SQLITE3)
	{
	  t << "(";
	}
	t << "(" << text << ")";
	if(dialect != ORACLE)
	{
	  t << " as";
	}
	t << " \t" << tab.ToString() << '\t';
	if(dialect == MSSQL || dialect == PGSQL || dialect == SQLITE3)
	{
	  t << ")";
	}
	
	return SqlSet(String(t), SqlSet::HIGH);
}

Previous Topic: What about Firebird
Next Topic: SQL_Sqlite3 GROUP_NAME error
Goto Forum:
  


Current Time: Fri Apr 19 21:43:28 CEST 2024

Total time taken to generate the page: 0.02141 seconds