Builder 2009 -> 2010 upgrade oddity

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Builder 2009 -> 2010 upgrade oddity

Post by sandy771 » Wed 21 Nov 2012 22:30

As DevExpress no longer supports Builder 2009 I have had to upgrade some legacy code, for a small tweak, to Builder 2010.

The following code is used OK in 2009 to create a database on disk (the file does not exists before this code is executed). The provider is sqlite.

UniConnection1->Database = SaveDialog1->FileName;
UniConnection1->SpecificOptions->Add("EnableSharedCache=True");
UniConnection1->SpecificOptions->Add("ReadUncommitted=True");
UniConnection1->Connected = true;

With builder 2010 the database is not created and I get a "database does not exist" error.

Any ideas what could be going wrong here?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Builder 2009 -> 2010 upgrade oddity

Post by AlexP » Thu 22 Nov 2012 09:38

Hello,

In the new version of UniDAC a new option ForceCreateDatabase (the default value is False) is included to the SQLite provider, which is responsible for the creation of a new DB. To create a new DB when opening the connection, this option should be set to True, otherwise there will be an attempt to open the specified file.

Code: Select all

UniConnection1->Database = SaveDialog1->FileName;
UniConnection1->SpecificOptions->Add("EnableSharedCache=True");
UniConnection1->SpecificOptions->Add("ReadUncommitted=True");
UniConnection1->SpecificOptions->Add("ForceCreateDatabase=True");
UniConnection1->Connected = true;

sandy771
Posts: 194
Joined: Tue 22 May 2007 13:57

Re: Builder 2009 -> 2010 upgrade oddity

Post by sandy771 » Fri 23 Nov 2012 10:58

Thansk Alex

That worked for the 2010 upgrade (for a hopefully one off tweak to some old code) but I am now having problems upgrading to XE3.

Basically I have created a new project and added all the source files from an existing Builder 2009 application. I am getting some exceptions that seem to be related to reading or writing to sqlite databases (sqlite dll version 3.7.14.1). I am using unidac 4.5.9.

I appreciate that I haven't given you much but I wanted to check whether there are any differences between the unidac versions (similar to the ForceCreateDatabase) that I should know about.

Thanks

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Builder 2009 -> 2010 upgrade oddity

Post by AlexP » Fri 23 Nov 2012 12:27

hello,

Our products are constantly being developed: new features are added, found problems are fixed, performance is improved. Therefore, indeed, the new versions are different from the previous ones. To help you in solving the problem, we need you to provide detailed description of the error you faced and the actions leading to this error, or sent a small example demonstrating the problem (including the DB file) to info*devart*com

Post Reply