Hi,
Using simple criteria in Aurelius with this code:
Criteria := objManager.Find<TPessoa>;
Criteria.Add(TLinq.Eq('TipoPessoaEmpresa', True));
Criteria.Add(TLinq.Eq('PessoaAtiva', True));
Criteria.OrderBy('Nome', false);
But, on open AureliusDataSet, have this conversion error: Conversion failed when converting the varchar value 'T' to data type bit.
I try do all steps, but don't works.
We fix error editing Aurelius.Sql.AnsiSQLGenerator.pas, in line 953:
if Value = True then
Result := '1' // T = True
else
Result := '0'//'F'; // F = False
Someone have other options?
Best Regards
Araujo Junior
wlandgraf
(Wagner Landgraf)
April 17, 2016, 2:45am
2
You solution is similar to the solution posted in the other forum. Maybe you overlooked something. Are you sure you used the "MSSQL2" (or whatever is the new name of your generator)?
The problem is solved. You have reason I overlooked, the Dialect on Create connection.
DBConnection := TFireDacConnectionAdapter.Create(UnionConn, 'MSSQL2', True);
But, on use TDataBaseManager with this connection we have follow error:
'There is no Schema Importer registered for SQL dialect "MSSQL2".
Add unit Aurelius.Schema.XXX to your project, where XXX is the SQL dialect you want to use'.
Have sugestions?
Best Regards
Without using MSSQL2 dialect, Fields of type Boolean are created with type Char(1). Have one option where we can use Default field Boolean for MSSQL?
Best Regards
wlandgraf
(Wagner Landgraf)
April 18, 2016, 7:37pm
5
You can register the Schema importer for MSSQL2 as well, but in this case there is no need to do any changes:
uses Aurelius.Schema.MSSQL, Aurelius.Schema.Register
TSchemaImporterRegister.GetInstance.RegisterImporter('MSSQL2', TMSSQLSchemaImporter.Create);