I have watched a lot of videos, bought two cources, bought a book.
But as far as I can see none explain how to use third party drivers,
only native drivers.
My goal is really simple, connect to a Postgres database and show the contense of a small table.
I
even hired a programmer at Upwork, he presented a working sample, OMG
was that code complicated :) He delivered approx. 1000 lines of code
just to connect and show a table in a grid :)
Here is a little sample, I have no idea what is going on:
if Field = nil then
Continue;
FieldName := Field.FieldName;
if Pos('.', FieldName) = 0 then
Prop := EntityType.FindProperty(FieldName)
else
Prop := EntityType.FindNavigationProperty( TJSString(FieldName).split('.')[0] );
if Prop = nil then
Continue;
PropType := FindPropertyType(EntityType, FieldName);
if PropType = nil then
Continue;
case PropType.TypeKind of
TXTypeKind.xtInt16, TXTypeKind.xtInt32, TXTypeKind.xtInt64,
TXTypeKind.xtDouble, TXTypeKind.xtCurrency:
begin
if IsNumber(AFilterText) then
FilterExpressions.push(Format('(%s eq %s)',
[TJSString(FieldName).replace('.', '/'), AFilterText]));
end;
TXTypeKind.xtText:
-------------------------------------------
Now,
I started the wizard from File...New...Other and created a TMS Xdata
VCL server. The wizard used SparkleHttpSysDispatcher, XDataserver,
XDataConnectionPool and AureliusConnection.
Then I plased a TUniConnection and a TPostgresqlUniProvider on the form.
I started the Aurelius Connection Editor and used Adapter Mode.
- Adapter Connection: UniConnection1
- Adapter Name: UniDac
- Sql Dialect: Postgresql
I tried to test the connection and received an error message: "Adapter "UniDac" is not supported at design-Time.
Nor can I Generate Entities fra the database right clicking on the AureliusConnection.
I
cannot use more time on this, is it possible you or a partner could do a
sample program that use UniDac and connect to Postgres, I shall of
course pay for the work :)
Regars
Ole