DA , Firemonkey and Fb Connection

Hi,

My environment : delphi 10.2.1 , DA: 9.3.105.1337
Firebird: 2.5.7, Driver: FireDAC

When I connect to a Database , it keep reporting user name or password wrong.
But I confirm I can connect to the FB using ibexpert tools.( I did not install interbase server)
I attached the message at the bottom.

Please advise what is the problem.

For Andriod Firemonkey client project(created by the DA wizard), I try open a table with double precision type field, It show address violation. But In Windows 32 platform it wont.

Please advise.

Joe

I can’t reproduce problem with SchemaModeller:

.

can you create a simple testcase for double precision issue or post DDL script for problematic table.
you can post it here or drop email to support@

for the double precision case on firemoney, I need check again and make sample to you. I will send later.

for the firedac firebird cannot login case, I install old version RemObjects Data Abstract_9.2.103.1311, It can connect firebird

but I install new version RemObjects Data Abstract_9.3.105.1337. It cant connect.
Also if I change not use fireDAC , use DBX. it can login firebird but I retreive the table field it show error " cannot obtain meta, specifty target table.

Please find the attached for reference and please advise.

my windows is win7 home premium sp1, sim language, delphi 10.2

Thanks, logged as bugs://78874

Then how can I resolve it now?

For the double precision case I confirmed the case:

  1. just create a table with 2 or more double precision field , when you open the table in firemonkey android apk.
    it show address violation. If only one double precision field, it can run correctly.

I attached the sample server and client project source with the sample firebird DB in 2.5

CREATE TABLE TEST_TBL (
STR1 VARCHAR(20),
FLOAT1 DOUBLE PRECISION
); << this work

CREATE TABLE TEST2_TBL (
STR1 VARCHAR(20),
FLOAT1 DOUBLE PRECISION,
FLOAT2 DOUBLE PRECISION
);
<< this not work.

even I create a view on test2_tbl only select 1 double precision field:

CREATE OR ALTER VIEW TEST2_VIEW(
STR1,
FLOAT1)
AS
SELECT STR1, FLOAT1 FROM TEST2_TBL
;

It is also not working.

ErrorSample.zip (203.3 KB)

Please advise

temporary workaround is simple - replace User ID with UserID in connection string:

Untitled

later I provide the final solution

I’ll review testcase a bit later, after I’ll finish with #78874

I can’t reproduce any problems with your testcase:

I’ve modified a bit your code:

procedure TClientForm.Button5Click(Sender: TObject);
begin
  ClientDataModule.cdstest2.Open;
  ShowMessage('test2 + '+ClientDataModule.cdstest2.FieldByName('STR1').AsString+':'+
  FloatToStr(ClientDataModule.cdstest2.FieldByName('FLOAT1').AsFloat)+ ':'+
   FloatToStr(ClientDataModule.cdstest2.FieldByName('FLOAT2').AsFloat));
end;

can you attach your source and the binary for server and apk with edit box for input server IP for client to make connection?

I find that my server source attached is not correct as I forget to save the project before upload.
also my version is RemObjects Data Abstract_9.2.103.1311.

I just added 2 missed tables into .daSchema (server-side), updated server address and text for showmessage.

client-side binary:

server-side wasn’t attached because it won’t work for you (ASLEE.FDB was put to other path)

I’ve used DA 9.3

Note: check that parts of FMXApplication2.7z archive were saved under correct names

I’ll try to rebuild the source in 9.3 and see Thanks

I cannot extract the client side library.

Is it only 2 file ? I use 7zip to open it cant open.

Can you send to my jptec18@gmail.com, please include the server binary, I will try to make same path as your server data path .

also build in da 9.3, delphi 10.2.1 also same case.

What Information I need to pass to you to check?

files should be FMXApplication2.7z.001 and FMXApplication2.7z.002.
this forum can add extra .7z extension like FMXApplication2.7z.001.7z

gmail doesn’t allows to .exe in archives:

552-5.7.0 This message was blocked because its content presents a potential
552-5.7.0 security issue

so you need to create it by yourself

bugs://78874 got closed with status fixed.

fix for #78874 will be in next beta

I’ve used your apk with our sever but we also hit access violation on Open Table 2, Open View.

I just tried if I change the float type to currency type ( but ddl remain unchanged).It works

I attached my source with the binary for server and client.

https://drive.google.com/open?id=0ByARbY6i0DfXamluR2k4OG9GV1E

for server, you can edit the server.ini to match your DB path to work.

I attached two call stack for the error tracing. it is delphi 10.2 and DA 9.2
but I’ve tested 9.3 with delphi 10.2.1 also hit same problem.

Please advise.

I’ve used your binaries (FMXApplication2.apk & FMXApplication2Server.exe) and everything works:

lets check emulator settings.

My one is

I tested in phone with android 6.0 not a emulator. It get this error.

Any hints on this problem?

I will try in a emulator with android 6.0 api 23 level to match the phone case see if it a error.
will let you know

Joe

I’ve retested your binaries with


and it works as expected.

check that your phone is fully supported.
according to Android Devices Supported for Application Development article, Delphi Tokyo supports only ARM Cortex-A series CPU so ARM Cortex-M, ARM Cortex-R and SecurCore may not work correctly.

also try to create testcase that has 2 double fields but not use RO/DA and test it on your physical phone.

I tested damemtable created two float and 1 string it works. I open it and append data also no problem.

The problem only get data from server then have this problem.

I attached my testing phone. You can see it Cortex-A series and it works for other build apk too.

Please advise.

As Now it is working for currency field type, what is the different on DatCurrency ,DatFloat type field?

datCurrency is a fixed-point data type that minimizes rounding errors in monetary calculations (-922337203685477.5807 .. 922337203685477.5807)
datFloat uses Double for storing data (2.23e-308 .. 1.79e+308)


Edit: can you perform additional tests, pls?

create “empty” OnReadFieldValue event in TDABin2DataStreamer (client-side) like

procedure TClientDataModule.DataStreamerReadFieldValue(const aField: TDAField;
  var Value: Variant);
begin
//
end;

it will decrease performance, but probably solve your original issue