Database entities

Hi


I'm trying to establish a database connection in my Web Core project.

I right click the tAureliusConnection component in the Xdata server to generate entities from my database (postgreSql using UniDac) but get message "Adapter UniDac is not supported at Design-time"

What method can I use/what to do?

Ole

You can create a new Delphi package, add Aurelius.Drivers.Unidac.pas unit to it, compile and install. This should be enough to make Unidac driver available at design-time.

Tried, but cannot make it work, access violation of some sort.


Trying to connect to a Postgres database using Tms is difficult. What's the point having a right click option at design time when it's not working :)

Is there a simple example how to make a Xdata server connecting to a Postgres database, in code?

Using Web Core without database connection is great. But database stuff, really difficult. That's a shame, it's the reason I invested in your All Access in the first place.

Regards,
Ole


It's just that UniDac is a 3rd party component. The design-time right click works fine with the native components: FireDac, ADO, dbExpress. As a temporary workaround you can try to use one of those just to import the classes, and then keep using UniDac as runtime.


Alternatively, if you are an All-Access user, you can simply use TMS Data Modeler to import the database structure and export Aurelius classes. It actually has even more advanced options than the "Generate entities" option you are trying to use. 

Finally, if you got an Access Violation, I believe the IDE showed a call stack in the Details of the error? Can you please provide that so we can have an idea of why it's happening?

After struggling for 3 days and 25 hours I give up importing my Postgres database structure and will terminate the project, it's just to difficult and too many error messages of different kind.


Regards,
Ole






Ok. If you have any question or still want any help, just let us know.

Do someone find a way to make the UniDac components available in TMS WebCore? 


- TUniConnection
- TUniQuery
- TMySQLUniProvider (and others)
- TUniDataSource

Many thanks
Patrick

UniDac components cannot work from the client side (i.e. directly from the web browser as this would imply a serious security issue) but it can be used in the backend from the web client application.