U++ framework
Do not panic. Ask here before giving up.

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: Sun May 24 04:40:17 GMT+2 2026

Total time taken to generate the page: 0.00441 seconds