Database migration from Delphi 2007 Pro to Delphi 10.2

0

Hello all,

I have a basic question concerning migration of my Delphi code for databases I created years ago and still use. The databases were created using Database Desktop, for example, a radioactive material decay database named decay.db.

From my old Delphi 2007 Pro VCL Form Application, I would go to the BDE Tool Palette and drop a TTable component on my form (which defaulted to the name Table1). Under Properties, I would set the DatabaseName property to my database path, for example c:\file_path\. I would then set the TTable component's TableName property to decay.db. I could then set the Active property to True.

My next step would be to place a DataSource (default name DataSource1) onto the form and set the DataSet property to Table1.

At that point, if I had a TDBGrid component on the form, I would set the property of the DBGrid1 to Table1 and my database would be ready to go.

When I load my old code into Delphi 10.2, I get a message that the component TTable is missing. My question is this: I need to change my code so that I can still access my database (decay.db) without the TTable component that was required in Delphi 2007 Pro.  The last thing I want to do is to have to make drastic changes in my different programs that have databases. Can someone please help me with how to use the new DataSource component and get my database active in 10.2?

 

Thanks in advance for any help.

Greg Madison

Responses (4)
  • Accepted Answer

    Monday, May 14 2018, 09:03 AM - #Permalink
    0

    Marko, Thanks, I got both of your latest responses. I'll have a look. I am using the database as a single user application so knowing I need to use SQLite helps a lot.

    I've made quite a bit of progress since following your suggestions. I really do appreciate your help.

     

    -Greg

    The reply is currently minimized Show
  • Accepted Answer

    Monday, May 14 2018, 07:29 AM - #Permalink
    0

    Greg,

    I have given up waiting for this forum to catch up!

    Have a look at the Samples :

    Object Pascal\Mobile Snippets\FireDACSQLite this gives an example of how to use SQLITE

    The reply is currently minimized Show
  • Accepted Answer

    Saturday, May 12 2018, 06:05 AM - #Permalink
    0

    Marco, Thanks for the response. I'll download and take a look. The article encourges users migrate to FireDAC which I wouldn't mind doing, however, I haven't gotten it to work yet. I'm going through the "First Steps to Use FireDAC" on the embarcadero website but I seem to hit an error when I get to the point where I have to enter the SQL property command "SELECT * FROM orders".  I didn't have enough time to properly work with the tutoral yesterday.

    I'm watching a youtube video by Marco Cantu titled "Introduction to FireDAC" but he's using components from AnyDAC from his component palett which I don't have so I haven't been able to replecate his process yet. I may be able to download AnyDAC, I'll look sometime today.

    I'm a physicist, not a professional programmer. I write the code to perform many calculations and analysis of data that I would otherwise have to do by hand, hence, my lack of knowledge in newer database technologies. It also doesn't help that I bough 2007 Pro and this is my first upgrade since then.

    Do you use AnyDAC or do you use one of the components that came preinstalled with the Delphi 10.2?  Thanks again for your help.

    -Greg

    The reply is currently minimized Show
  • Accepted Answer

    Friday, May 11 2018, 04:55 AM - #Permalink
    0

    Greg, 

     

    Check out http://support.embarcadero.com/article/44082 regarding BDE (which has the database TTable controls etc in it)

     

    I still use the BDE in some apps but database desktop doesn't run since Windows 10 creators update on my machine.

    The reply is currently minimized Show
Your Reply

Please login to post a reply.........