RTC Forums

Subscription => Support => Topic started by: Lexi on September 11, 2014, 09:14:21 PM



Title: Where can I find examples of DBAccess with modern connectors FireDAC, UniDac (ex
Post by: Lexi on September 11, 2014, 09:14:21 PM
Hi,

1 Where can I find examples of DBAccess (server) with modern connectors FireDAC, UniDac (extreme case ADO) ?

2 Where can I find an example of a multi-threaded access to the Database server ?

Thanks.


Title: Re: Where can I find examples of DBAccess with modern connectors FireDAC, UniDac (ex
Post by: D.Tkalcec (RTC) on September 12, 2014, 12:11:20 AM
You won't find examples for different database "connectors" in the RTC SDK, because the RTC SDK is not a Database-related component set. Only basic examples using the BDE are included in the package, with an explanation on how they work, which should help you write your own code for other database "connectors". Some older Database-related examples can be found in the RTC SDK Articles Archive (http://www.realthinclient.com/sdkarchive/indexc41b.html).

For Multi-Threaded Database acces, you have the choice between creating database components on-the-fly when you need them and releasing them afterwards (the simplest, but not very optimized solution), or use a Database Connection Pool. Some Database "connectors" come with Database Connection Pooling components and/or examples, or your can write your own. Here is an article which describes what Database Connection Pool is, with an Example Database Connection Pool implementation (http://www.realthinclient.com/sdkarchive/indexfb7e.html).

Best Regards,
Danijel Tkalcec


Title: Re: Where can I find examples of DBAccess with modern connectors FireDAC, UniDac (ex
Post by: Lexi on September 16, 2014, 08:30:05 AM
I tested some samples. Sample DBDemClient2 (Editing the Grid). (http://www.realthinclient.com/sdkarchive/index15b715b7.html)

After adding a new record (through Navigator) and pressing Enter button the program showed message "Operation must use an updateable query".

The form used TClientDataSet.

What the problem?


Title: Re: Where can I find examples of DBAccess with modern connectors FireDAC, UniDac (ex
Post by: D.Tkalcec (RTC) on September 16, 2014, 10:56:18 AM
The error message suggests that you are trying to use a read-only Query component to update a Database, so you probably need to change some property on the Query to make it updateable.

My guess is that the components you are using now have changed over time, which made the example (written by Glynn Owen seven years ago) stop working properly, so you need to update it to work with the version of the components you are using.

If you need help using Database access components in Delphi, try Database-related Embarcadero Forums.

Best Regards,
Danijel Tkalcec


Title: Re: Where can I find examples of DBAccess with modern connectors FireDAC, UniDac (ex
Post by: Lexi on September 16, 2014, 11:30:50 AM
The same situation with Interbase components (and demo from  Dennis Ortiz) that have become IBX.

I translated all into IBX, but Denis's demo doesn't works after running.

think it's too  Database-related Embarcadero Forums.