Jump to content
GrumpyNoMore

Help connecting D11.3 Community Edition FireMonkey Android app to Azure SQL database

Recommended Posts

I am a hobby developer so I use CE. I have an Android app developed in the FireMonkey framework. I want to connect it to an Azure SQL database but I have found the Community Edition restrictions seem to prevent it. CE contains ADO components in the normal Delphi IDE but the FireMonkey IDE doesn't. FireMonkey in CE contains many of the FireDAC components but not an MSSQL driver. There are some 3rd party components but the ones I have found are too expensive for me.

 

Does anyone know any way I can connect my Community Edition FireMonkey Android app to an Azure SQL database without paying hundreds of dollars?

 

Share this post


Link to post

Thanks for the suggestion @Serge_G. I downloaded V7 and installed it. Looks good but it is throwing some errors that I think are related to V7 being compatible with Delphi 10 but not Delphi 11. ZeosLib V8 which is apparently for Delphi 11 isn't yet released. Do you (or anyone) know whether it is possible to use the unreleased V8 and if so how I could do that?

Share this post


Link to post

I used Zeos with Delphi 11 only for test purpose (vs. Lazarus). But I didn't find any issue. I don't remember what version was (7.2 or 8).

 

Reading on Zeos forum seems that is compatible with Delphi 11.

 

Try to download from: https://github.com/frones/ZeosLib

Share this post


Link to post
Posted (edited)
20 hours ago, GrumpyNoMore said:

...and by the way @Serge_G thanks for taking the trouble to respond over the Christmas holiday period. You are a champion!

 

A retired champion for now :classic_wink: so I have time.
I don't remember if I install ZEOS on my D11 version, but I always use SVN  (http://svn.code.sf.net/p/zeoslib/code-0/trunk) version of ZEOSDBO, perhaps this is why I don't mind this compatibility trouble 😄
as you can see
image.thumb.png.a34af0bbc2fd8fad13717ca53da2631a.png

also ready for Delphi 12 Athenes :classic_smile:

 

Best wishes for new year

Edited by Serge_G
more info

Share this post


Link to post

Thanks @Serge_G and @DelphiUdIT for your assistance. I have tried the following but still having trouble:

  1. Downloaded ZeosLib v7 install files from SourceForge and installed successfully in Delphi 11 but found roadblocks trying to get TZConnection to make a successful connection. I put that down to incompatibility between ZeosLib 7 and Delphi 11 so uninstalled and went looking for ZeosLib 8.
     
  2. Downloaded ZeosLib 8 packages/Delphi11 and src folders from https://github.com/frones/ZeosLib and began compiling/building from them but ran into issues that stopped me from installing he component package. The design-time package is ZComponentDesign.dproj (ZComponentDesign.dpk) but it has dependencies on the others so I built them all, culminating in ZComponentDesign. As I built each one, it generated its corresponding .bpl and .dcp files with the file suffix 280 which is the one you expect for Delphi11 compatibility. However, when I attempt to build ZComponentDesign.dproj (or ZComponentDesign.dpk), it throws an error: "Can't load package ZComponentDesign280.bpl. The system cannot find the file specified" and neither its .bpl or .dcp files are created. I think, 'Of course it can't find ZComponentDesign280.bpl - that is the file I am trying to create by building this package!' I have tried all kinds of things that I won't bore you with unless you ask specifically, but I can't get past this.
     
  3. Downloaded ZeosLib 8 packages/Delphi11 and src folders from http://svn.code.sf.net/p/zeoslib/code-0/trunk and used them to build instead, in case there was some crucial difference, but got to the same roadblock.

image.thumb.png.0add4cd8e5390f24a3b773374eb855a1.png

 

image.png.9a0acd28618f07e51863c30009c8f857.png

 

image.png.fc4b655d3de3024c8b631f533a016630.png

 

In the Output tab, it shows as having succeeded with no errors...

image.png.bbc27707227416c3964609ebc69a53c2.png

 

... but in the Build tab it throws an error and doesn't create the file it says it can't load.

image.thumb.png.96b6ffee860fe45253f91596c4ff2ccb.png

 

I would be grateful for any assistance and advice you can give.

Share this post


Link to post

My way :

1 - Open ZEOSDBO.groupProj. (not bpl :classic_wink:)

image.thumb.png.89b20a3133128f726b20c620992fca36.png

 

2 - Compile each package (in order) and, for design one, install. 

 

Long time ago I start writing a French tutorial, unfinished because I use now Firedac in priority. 

 

Edited by Serge_G

Share this post


Link to post

Thanks @Serge_G, doing it your way finally got ZeosLib installed in my Delphi11 CE. I now have access to all the components.

 

However...

 

I have now come up against another roadblock. This one takes us away from the original title of this post, so please advise me if it should be respawned as a new post.

 

In my FireMonkey Android app, I now have a TZConnection component. This requires ZAbstractConnection and ZConnection in the Uses clause. Those units have dependencies of their own, including ZDbcResultSet. When I try to compile the app, I get an error thrown by the compiler in ZDbcResultSet:
 

"E2037 Declaration of 'Realloc' differs from previous declaration"

 

I have never been inside component library units much before but, looking into ZDbcResultSet.pas (attached) I see the function Realloc seems to be declared 3 times, in lines 1379, 1393 and 1405. While, to my eyes, the three declarations appear identical, the compiler only throws the error in respect of the declarations at lines 1379 and 1405.

 

image.thumb.png.32dff061d4b19ee15074f69e3f4b35a7.png

 

Is that because the compiler gets to the one in line 1393 first? I don't know enough to know the answer to that. As an experiment I commented out the declarations at lines 1379 and 1405 but the compiler still threw the same error on the remaining declaration (line 1393). In that case, what is the previous declaration it is complaining about? Maybe Realloc() is declared in another unit? Again, I don't know enough to know if that is even worth investigating.

 

I have spent half a day struggling over this one because I don't want to keep asking for help. Sorry, but I need help!

 

ZDbcResultSet.pas

Share this post


Link to post

Hi,
This is a question I can't respond easily, I have to write one Android application to check that. I will be back 😄
Meanwhile, check/ask on ZeosLib Portal 

 

Edited by Serge_G

Share this post


Link to post

Thanks so much for your patience @Serge_G.

 

To replicate the issue I think all you have to do is drop a ZConnection component on a form and Compile. ZeosLib 8, Delphi 11 CE. Windows or Android, they both throw the error for me.

Edited by GrumpyNoMore

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×