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
Goto Forum:
  


Current Time: Mon Oct 25 15:46:25 CEST 2021

Total time taken to generate the page: 0.01599 seconds