C++Builder | Andreano Lanusse | Technology and Software Development Where Andreano Lanusse talk about technology, software development, programming techniques, databases, games and more through articles, tutorials and videos Mon, 12 Aug 2019 04:35:13 +0000 en hourly 1 https://wordpress.org/?v=6.7.4 CopyReaderToClientDataSet after XE2 – Where are you? http://www.andreanolanusse.com/en/copyreadertoclientdataset-xe2/ http://www.andreanolanusse.com/en/copyreadertoclientdataset-xe2/#comments Sun, 23 Feb 2014 20:53:14 +0000 http://www.andreanolanusse.com/en/?p=958 CopyReaderToClientDataSet copies the contents of a TDBXReader into a TClientDataSet instance. It returns the same TClientDataSet instance that was passed to this method. CopyReaderToClientDataSet is part of the Data.DBXDBReaders.TDBXDataSetReader class until Delphi/C++Builder XE2, however in XE3 it changed a little bit, it became part of a new class called Data.DBXCDSReaders.TDBXClientDataSetReader. I got several e-mails from my blog readers that downloaded some of my […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
CopyReaderToClientDataSet copies the contents of a TDBXReader into a TClientDataSet instance. It returns the same TClientDataSet instance that was passed to this method.

CopyReaderToClientDataSet is part of the Data.DBXDBReaders.TDBXDataSetReader class until Delphi/C++Builder XE2, however in XE3 it changed a little bit, it became part of a new class called Data.DBXCDSReaders.TDBXClientDataSetReader.

I got several e-mails from my blog readers that downloaded some of my examples, when compiling with latest versions they got a error message saying the CopyReaderToClientDataSet method can’t be found.

The solution is simple, add Data.DBXCDSReaders.pas as part of the uses clause and replace all the TDBXDataSetReader by TDBXClientDataSetReader, which is the new home for CopyReaderToClientDataSet.

Enjoy!!!

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/copyreadertoclientdataset-xe2/feed/ 1
Delphi XE5 Update 2 – many bug fixes on FireMonkey for iOS, Android and compiler http://www.andreanolanusse.com/en/delphi-xe5-update-2-many-bug-fixes-firemonkey-ios-android-compiler/ http://www.andreanolanusse.com/en/delphi-xe5-update-2-many-bug-fixes-firemonkey-ios-android-compiler/#respond Sat, 28 Dec 2013 05:56:33 +0000 http://www.andreanolanusse.com/en/?p=953 Another update available for Delphi XE5 and C++Builder XE5, the Update 2 is has lots of bug fixes covering several areas, specially on FireMonkey for Android, iOS, Windows and Mac. The Update is available for registered users and you can find on the following links. Just a friendly remind that you need to Uninstall your […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Another update available for Delphi XE5 and C++Builder XE5, the Update 2 is has lots of bug fixes covering several areas, specially on FireMonkey for Android, iOS, Windows and Mac.

The Update is available for registered users and you can find on the following links. Just a friendly remind that you need to Uninstall your current Delphi XE5 in order to install XE5 Update 2.

Below the complete list of bugs fixed on this Update.

 

Reference No

Summary

Component/s

[Indy] Access Virolation occues on OnValidatePeerCertificate for IPPeerCommon bug[HTTPS,SSL] 3rd Party

120473

[iOS] SOAP fails in iOS when using SSL (“IOHandler value is not valid.”) Blocker

119873

TCameraComponent causes memory leak in Win32 Blocker

115697

TDump command crashes on DLL’s Command Line Tools

112826

TDump.exe shows strange output Command Line Tools

100328

TDump crashes on the x64 shell32.dll Command Line Tools

110887

TDump fails on some ‘foreign’ .dlls Command Line Tools
Delphi XE5 cannot build OSX applications from the command line Compiler
[FM Mac OSX 10.9] Compile error XMLDocument using SDK 10.9 Compiler, Compiler\C++

120686

[Mavericks 10.9] C++Builder XE4 does not support OS X 10.9 Compiler, Compiler\C++, Compiler\C++\BCC
Throwing a exception in virtual member function returning an AnsiString causes an AV and an abend under certain circumstances, in 32-bit C++ application Compiler, Compiler\C++, Compiler\C++\BCC, Compiler\C++\BCC\Back End

120476

[iOS ARM][Android] E2581 Backend error: invalid linkage type for global declaration Compiler, Compiler\Delphi
[dcc(ios/a)arm] Backend Error compiling constructor for generic classes Compiler, Compiler\Delphi

118897

method overload resolution fails when passing @ parameter to overloaded methods mixing Pointer and specific pointer parameters. Compiler, Compiler\Delphi
ShowMessage/Message Alerts not working in iOS 7 Simulator Compiler, Compiler\Delphi
[dccaarm][dcciosarm] Implicit finally block doesn’t execute if the exception is not catch in except block. Compiler, Compiler\Delphi
Crash by declaration error when declaring class function in record type Compiler, Compiler\Delphi
Internal Error URW1154 calling TValue.From() of System.Rtti Compiler, Compiler\Delphi

72147

Invalid section table entries on empty sections Compiler, Compiler\Delphi

119197

subtraction of sets changes its params Compiler, Compiler\Delphi, Compiler\Delphi\CodeGen
Integer computation error upon mixing Byte and Integer Compiler, Compiler\Delphi, Compiler\Delphi\CodeGen
When Currency is used in a generic record type you get an internal compiler error G1239 IN Zephyr and G1232 in XE4 Compiler, Compiler\Delphi, Compiler\Delphi\Generics

118815

Generic method inlining (part 2) Compiler, Compiler\Delphi, Compiler\Delphi\Generics

118866

Cannot perform FillChar on Currency variables – E2197 Constant object cannot be passed as var parameter Compiler, Compiler\Delphi, Compiler\Delphi\Messages

93738

Internal Error URW1136 Compiler, Compiler\Delphi, Compiler\Delphi\Messages

118929

Totally broken package compiler for an iOS device Compiler, Compiler\Delphi, Compiler\Delphi\Packages/Libs

118523

[dcc32] Command-line build fails for user account with non-ASCII characters Compiler, Compiler\Delphi, IDE\Build System
DataSnap : Memory leaks caused by TFDJSONDataSetsBase.FOwnsDataSet Data, Data\DataSnap
DataSnap: HTTP request may be broken when sending Delta Data, Data\DataSnap
[C++][DataSnap]Exception raised when trying to execute server method through proxy on OS X 10.9 Data, Data\DataSnap

116417

[ISAPI] DataSnap Server as an ISAPI DLL get a 48KB limitation when receiving POST data Data, Data\DataSnap
[OS X][DataSnap][FireDAC] Unable to find static library: DataSnapFireDAC.a Data, Data\DataSnap, Data\FireDAC
[DataSnap] TX509CertificateIndy.Verify is not operation as specification. Data, Data\DBX
Unable to load libsqlib.dylib Data, Data\DBX
DBX memory leak when running queries on NEXTGEN platforms Data, Data\DBX
FireDAC FDConnection does not autocommit Data, Data\FireDAC
FDExplorer resizing causes lost display of description column message Data, Data\FireDAC
Building a Mobile Application that contains a TFDPhysIBDriverLink component raises an error Data, Data\FireDAC
[SQLite] It can’t encipher by the specified encrypt parameter, so it can’t setup except aes-256 Data, Data\FireDAC
If XML containing MBCS is saved by SaveToStream, It is not copied correctly.. Data, Data\FireDAC
If XML containing MBCS is copied to TFDMemtable, Exception class EDOMParseError occurs Data, Data\FireDAC
FireDAC memory leak when running queries on NEXTGEN platforms Data, Data\FireDAC

119995

“Not editing” error reported with LiveBindings when calling ApplyUpdates on TAdapterBindSource Data, Data\LiveBindings

118633

[iOS device/Android] With TSoapConnection, TClientDataset.ApplyUpdates raises “Exception in safecall method” in iOS device and Android Data, Data\Midas

118633

[iOS device/Android] gdb reports wrong file after step into Debugger
Debugging not working with a FireMonkey Mobile app on Nexus 7 2013 Debugger
[Delphi] Access Violation when Inspecting or Adding a Watch with a function where an array is passed in as a var or const Debugger
Function call evaluation on C++ OSX apps is broken when using Mavericks Debugger, Debugger\Evaluator

120506

[OSX 10.9] Mavericks Modules Debug Window doesn’t show framework dylibs anymore Debugger, Debugger\Views

119777

ReqMulti.pas has been removed from the product File Delivery, Internet
[FMX/Android] TEdit causes SIGSEG if SetFocus method is called inside Forms’s OnCreate event. FireMonkey
[iOS] Sharing popup size is calculated wrong FireMonkey

120259

Bugs in creating forms with TForm.CreateNew() – i.e. without a designer. FireMonkey
Orientation switch breaks app or bars user after device activated again (after sleep) FireMonkey

119176

[iOS7 iPad Simulator] App crash in iOS 7 iPad Simulator FireMonkey

118770

Bad text rendering on Android FireMonkey
Poor application performance on Nexus 10 FireMonkey
[iOS] TMemo – sometimes when using LongTap to bring up the context menu on iOS, the cursor and context menu is moved up with one line FireMonkey

118554

[iOS Device] iOS App crashes on iOS 6.1.3 (iPad) when Showing Forms – but not on Simulator FireMonkey
TabletMasterDetail app takes over 10 seconds to load on Nexus 10 FireMonkey

120566

When adding a TBindNavigator, an Access Violation occurs FireMonkey

118799

2D Empty app does not start on Samsung Galaxy Tab 3 FireMonkey, FireMonkey\3D Components

120517

TMemo.ScrollLayout could cause access violation FireMonkey, FireMonkey\Components

120827

[iOS7] With TMemo, unintentional letter appears when entering with Japanese keyboard. FireMonkey, FireMonkey\Components
Date Picker mobile code snippet TCalendarEdit – decrements the date when you don’t change the date in the picker FireMonkey, FireMonkey\Components
Using German ß (00DF; LATIN SMALL LETTER SHARP S) in TListBoxGroupHeader raises EArgumentOutOfRangeException FireMonkey, FireMonkey\Components
On HTC one X(4.1.1) cannot be typed a set of numbers if the keyboard has the vktPhonePad type FireMonkey, FireMonkey\Components

120515

TMemo.GoToTextEnd crashes at program startup and doesn’t move the horizontal scrollbar FireMonkey, FireMonkey\Components

120517

TMemo.ScrollLayout could cause access violation FireMonkey, FireMonkey\Components

119442

Mobile Code Snippets – Web Browser needs to be updated. Web Browser Top Margin should be 0 FireMonkey, FireMonkey\Components
Problem changing the KeyboardType among different TEdit FireMonkey, FireMonkey\Components

120136

[Android 4.3] TListView component scrolling performance is very slow (Samsung GALAXY Note 3) FireMonkey, FireMonkey\Components
Listview scrolling performance slow on Samsung Galaxy Note 3 FireMonkey, FireMonkey\Components
Custom TabIcon support missing for iOS 7 FireMonkey, FireMonkey\Components

119442

[iOS7 device] Web Browser positioned incorrectly in iOS7 FireMonkey, FireMonkey\Components

120007

[Android, iOS] Viewport3D does not fully display on a mobile form with TabControl FireMonkey, FireMonkey\Components

118859

[iOS] TMedia Volume cannot be changed in iOS FireMonkey, FireMonkey\Components
TWebBrowser misaligned when Align set to alClient FireMonkey, FireMonkey\Components

119891

[Android] Edit.SetFocus in Form.OnShow() will cause app crash when entering text FireMonkey, FireMonkey\Components
TabControl does not fit the screen completely widthwise when it has exactly 6 TabItems FireMonkey, FireMonkey\Components

119821

[Android] Performance of Delphi Apps on Google Nexus 10(Android 4.3) FireMonkey, FireMonkey\Components

119539

[iOS] TMediaplayer pause (stop) on iOS is rewinding FireMonkey, FireMonkey\Components

119447

[Android] Location demo on some Android devices not working FireMonkey, FireMonkey\Components
Korean input problem with Tmemo on OS X FireMonkey, FireMonkey\Components

119192

[Android] Uppercase national characters are drawn bad on Android FireMonkey, FireMonkey\Components

119162

[Android] password is shown on virtual keyboard FireMonkey, FireMonkey\Components
TMemo very slow on Nexus 10 FireMonkey, FireMonkey\Components

119703

Stretched property of TText control does not work properly when TText is a child component for some other component, not a form FireMonkey, FireMonkey\Components

118859

[iOS] TMedia Volume cannot be changed in iOS FireMonkey, FireMonkey\Components

120023

[Android] TGestureManager crash on app close. FireMonkey, FireMonkey\Runtime
Throwing an exception and not catching it during any FMX component in an event have unexpected result FireMonkey, FireMonkey\Runtime

119450

[iOS7] vertical touch co-ordinate is several pixels lower than the actual touch position. FireMonkey, FireMonkey\Runtime

119444

[iOS7 device] Keyboard does not completely disappear when hidden in iOS7 FireMonkey, FireMonkey\Runtime
[NEXUS 10] SpeedButton – it takes too long until OnClick event is triggered FireMonkey, FireMonkey\Runtime

118910

Keyboard shift/ctrl+arrow keys not working for FireMonkey objects on a form FireMonkey, IDE, IDE\FireMonkey Designer
iOS 7 apps showing iOS 6 styled native controls (pickers/keyboard) on iOS Simulator FireMonkey, PAServer
FM C++ app with Mac OS X 10.9 SDK fails to compile IDE, IDE\Build System, IDE\Deployment, PAServer

120029

[Android] lower case of file path in deployedassets.txt IDE, IDE\Deployment
When starting RAD Studio XE5 (with android support installed) as the C++Builder personality it REMOVES the android SDK setting in the registry. IDE, IDE\General

118105

Android apps deployed to emulator will not function, display black screen IDE, Install

118830

Error detected (LME288), [ilink32 Error] Error: Unable to perform link Linker

116888

Strange linker crash Linker
Throw exception crash C++ Win64 app RTL, RTL\C++, RTL\C++\Exception Handling
Wrong behavior when executing code from a catch section on Mac OS RTL, RTL\C++, RTL\C++\Exception Handling
ARC Using Unsafe objects in records are not working properly RTL, RTL\Delphi
FM application crash at init in Android devices when the language is set to Norwegian (Norsk Bokmål) RTL, RTL\Delphi

118726

Application crash with raising exception class Segmentation fault (11) RTL, RTL\Delphi, RTL\Delphi\Other
SOAP: Double precision return values not correct for Android RTL, RTL\Delphi, SOAP

119872

SOAP AsDateTime implementation is wrong SOAP

119741

[Android] Segmentation fault consuming web service SOAP

76053

C++ templates are translated as “Vorlagen” Translation

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/delphi-xe5-update-2-many-bug-fixes-firemonkey-ios-android-compiler/feed/ 0
Delphi XE5 Update 1 – fixes for serious issues on ClientDataSet http://www.andreanolanusse.com/en/delphi-xe5-update-1-fixes-serious-issues-clientdataset/ http://www.andreanolanusse.com/en/delphi-xe5-update-1-fixes-serious-issues-clientdataset/#comments Tue, 29 Oct 2013 03:59:49 +0000 http://www.andreanolanusse.com/en/?p=949 The Update 1 for Delphi XE5 and C++Builder XE5 has been released. This update touch some areas like FireDAC, FireMonkey, Debugger, IDE and mainly ClientDataSet. Below a list of fixes related to ClientDataSet, which I consider critical errors and a blocker for anyone that was looking to migrate to XE5. Quality Central Reference No. Summary […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
The Update 1 for Delphi XE5 and C++Builder XE5 has been released.

This update touch some areas like FireDAC, FireMonkey, Debugger, IDE and mainly ClientDataSet. Below a list of fixes related to ClientDataSet, which I consider critical errors and a blocker for anyone that was looking to migrate to XE5.

Quality Central Reference No. Summary Component/s
118951 Numeric Filters on a TClientDataSet do not filter Data, Data\Midas
119028 Linker error: TXMLTransformProvider libraries missing Data, Data\Midas
119164 Attempting to use MIDAS (eg TClientDataset) in the simulator on iOS7 fails Data, Data\Midas
119432 TClientDataSet.Locate method fails to work properly with XE5 midas.dll Data, Data\Midas
  Application stops when driver is missing Data, Data\FireDAC
[Phys]-300 on connecting using Oracle / MSSQL / etc drivers using Arch SKU at design-time Data, Data\FireDAC

 

For a complete list of the specific problems fixed in this update, click here.

Download Links

You can download the update 1 installer or a new fresh ISO that includes Update 1:

That’s is, have fun.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/delphi-xe5-update-1-fixes-serious-issues-clientdataset/feed/ 6
Delphi Developers’ plan for mobile, desktop and n-tier development http://www.andreanolanusse.com/en/delphi-developers-plan-for-mobile-and-desktop-development/ http://www.andreanolanusse.com/en/delphi-developers-plan-for-mobile-and-desktop-development/#comments Sat, 13 Jul 2013 21:27:05 +0000 http://www.andreanolanusse.com/en/?p=935 Early this year I did a developer survey through my blog. I got over 1500 answers and I safely can say 87% use Delphi as their primarily development tools, the other 13% split between C#, C/C++, PHP and other languages. Mobile Development On the mobile development arena I asked about their company plans for mobile […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Early this year I did a developer survey through my blog. I got over 1500 answers and I safely can say 87% use Delphi as their primarily development tools, the other 13% split between C#, C/C++, PHP and other languages.

Mobile Development

On the mobile development arena I asked about their company plans for mobile development in 2013, and the results are interesting:

  • On Android development, 45% will develop apps for Android, 16% maybe will do some development and 5% don’t have any plan in 2013.
  • 28% will develop apps for iOS, 24% maybe will do some development, which we can consider pretty high, and 11% don’t have any plan for iOS in 2013.
  • Windows Phone is not in a good position; only 13% will do development for Windows Phone. Looking for the Microsoft Tablet (Surface), this one is way behind.
  • BlackBerry is not the favorite platform and has only 3% of the developers considering to develop, 11% not sure yet, and 40% will not develop at all.

Survey Mobile 2013

Android is the first choice, most of Delphi Developers do business application and I see a natural choice on Android, the number of devices out there and the lower price point when compared with iPhone/iOS leads Android more in to the business application development. When we look international market iOS devices would cost at least 60% more then Android devices, different reality from iOS, where we can pay US$200 on an iPhone.

Desktop and N-Tier Development

When asked about desktop development I made three questions, which I believe it’s correlated, here the questions:

  • Is your company planning to develop new Desktop applications in 2013?
  • Is your company planning to migrate existing Desktop applications to the Web in 2013?
  • Which of the following architecture would you use for new applications?

The results showed a clear demand for desktop development, where 73% of the interviewees plans to develop new desktop applications, however when you cross that with the architectural questions, 70% would use N-Tier architecture and only 24% would consider Client/Server.

[one_half first]Survey 2013 - Architecture
[/one_half]
[one_half]Survey 2013 - Desktop
[/one_half]

There is also a significant number of companies (45%) considering to migrate existing desktop applications to the web, 34% not planning and 21% didn’t decide yet. That information leads to us think about the challenges to migrate legacy applications where you can see all kinds of situation. Talking with developers I see most of the time the following scenarios:

  • High cost to migrate legacy code, which can’t be financially justifiable
  • High demand for maintenance and new projects, that doesn’t allow the team to stop or dedicate time to the migration project
  • The current application is working, no reason to change
  • And many others

Survey 2013 - Migration

 

Years ago the software development world moved away rom the traditional Client/Server in to the distributed development. There are so many technologies and architectures for distributed systems out there (SOA, REST, SOAP, WebServices, etc.), which are supported for many languages and IDE’s, but bring the question “Which software vendor has the best implementation and support for distributed applications?”.

Looking forward to see your comments and what’s your choice to build distributed applications?

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/delphi-developers-plan-for-mobile-and-desktop-development/feed/ 5
What’s new in Delphi XE4? http://www.andreanolanusse.com/en/whats-new-in-delphi-xe4/ http://www.andreanolanusse.com/en/whats-new-in-delphi-xe4/#comments Mon, 22 Apr 2013 14:16:40 +0000 http://www.andreanolanusse.com/en/?p=918 This time you didn’t have to way a full year to see a new Delphi release, 8 months after XE3 release Delphi XE4 is out. iOS development is the major topic of course and bring the second version of FireMonkey to iOS, a lot of expectation on this topic specially after XE2. Also there is […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
This time you didn’t have to way a full year to see a new Delphi release, 8 months after XE3 release Delphi XE4 is out.

iOS development is the major topic of course and bring the second version of FireMonkey to iOS, a lot of expectation on this topic specially after XE2.

Also there is a bunch of new stuffs to talk about, like:

  • New Delphi compiler for mobile platform, which brings several changes in the language and set a future path to the Delphi language, obvious these changes will affect desktop development in the future and you need to start learning about that now.
  • The SQLite and InterBase support for iOS
  • ClientDataSet available on iOS
  • Several FireMonkey changes for iOS, componentes, new classes
  • Etc..

RAD Studio XE4 now includes only Delphi, C++Builder and HTML5Builder. Delphi Prism is no longer part of RAD Studio, the name is dead and from now you have to refer to Oxygene from RemObjects. You can check the official communication from RemObjects here, where Marc Hoffman provide more details about the future related to .NET development with Oxygene (old Prism) and their support to iOS and Android development.

Trial is already available here or if you prefer download the full Delphi and C++Builder ISO here.

The Delphi XE4 documentation has a extensive list of What’s new in Delphi and C++Builder XE4, below the table of content:

That’s it for now.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/whats-new-in-delphi-xe4/feed/ 9
What does AnyDAC acquisition by Embarcadero mean for Delphi and C++Builder Developers? http://www.andreanolanusse.com/en/what-does-anydac-acquisition-by-embarcadero-mean-for-delphi-and-cbuilder-developers/ http://www.andreanolanusse.com/en/what-does-anydac-acquisition-by-embarcadero-mean-for-delphi-and-cbuilder-developers/#comments Fri, 08 Feb 2013 05:56:25 +0000 http://www.andreanolanusse.com/en/?p=906 Finally the day has come, Embarcadero acquired AnyDAC and there is a lot to talk about, early last year I invested a lot of time evaluating AnyDAC and know you know why 🙂 – I was very impressive with the amount of features,  AnyDAC is everything dbExpress tried to be and never reached. The reason […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Finally the day has come, Embarcadero acquired AnyDAC and there is a lot to talk about, early last year I invested a lot of time evaluating AnyDAC and know you know why 🙂 – I was very impressive with the amount of features,  AnyDAC is everything dbExpress tried to be and never reached.

The reason I say that it’s because AnyDAC really allows developers to target multiples database without the workarounds required by  dbExpress, like: Field Mapping when you persist the TFields. For long time AnyDAC allowed developers that use Delphi/C++Builder Professional edition to connect their application to Enterprise databases like Oracle, SQL Server, Sybase, Informix and others, something that was only possible through Enterprise and Architect edition, and much more.

Beyond that, there is a lot of specific database features supported by AnyDAC, which I consider very helpful in any database development, here some examples per database:

  • For all databases
    • Automatic Connection Recovery
    • Unified DB Events Support
    • Simplified architecture, it means no more Query + ClientDataSet + Provider just for a bi-directional cursor
    • Much better performance when compared with dbExpress
    • TADMemTable – in memory dataset, faster than TClientDataSet
    • Much easier to migrate BDE applications to AnyDAC than the traditional dbExpress architecture
  • Oracle
    • SELECT FOR UPDATE clause – no more workaround doing UPDATE just to lock the record
    • Query execution aborting – we always need that right?
    • ROWID columns for fast data editing and refreshing
    • RETURNING clause for fast data refreshing – no more select after the update to get a new value generated by trigger
    • and more…
  • Firebird
    • RETURNING clause for fast data refreshing
    • Trusted authentication
    • DB services – backup, restore, validate, security, etc
    • Query execution aborting
  • PostgreSQL
    • Yep, now you can connect natively with PostgreSQL
    • and more…
  • SQL Server
    • Batch commands with multiple result sets – Now you can use that and improve your app performance
    • Query execution aborting
    • and more…
  • MySQL
    • AUTO_INCREMENT columns and retrieving of last inserted value.
  • Drivers for several databases on Windows, Mac and iOS

This is a small list of interesting things on AnyDAC, you can find more here.

AnyDAC is a step forward and worth the effort to migrate from dbExpress to AnyDAC, there are lot of feature needed by Delphi and C++Builder developers, many of these features has been requested for a long time and you will have when using AnyDAC.

You may ask what is going to happen with dbExpress? BDE is dead, but still around :), dbExpress is not dead and I don’t think will die soon, but there is no reason to keep two database access technology since AnyDAC is way better than dbExpress.

AnyDAC trial is available for download here.

 

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/what-does-anydac-acquisition-by-embarcadero-mean-for-delphi-and-cbuilder-developers/feed/ 10
Survey 2013 – Help to define the content for my blog in 2013 http://www.andreanolanusse.com/en/survey-2013-help-to-define-the-content-for-my-blog-in-2013/ http://www.andreanolanusse.com/en/survey-2013-help-to-define-the-content-for-my-blog-in-2013/#comments Fri, 28 Dec 2012 07:05:55 +0000 http://www.andreanolanusse.com/en/?p=891 Dear blog readers, I prepared a short survey and I will appreciate if you can invest 5 minutes of your valuable time answering few questions. My goal with this survey is to learn more about your software development plans for 2013 and identify potential and useful topics to all of you. Also validate some content […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Dear blog readers,

I prepared a short survey and I will appreciate if you can invest 5 minutes of your valuable time answering few questions.

My goal with this survey is to learn more about your software development plans for 2013 and identify potential and useful topics to all of you. Also validate some content ideas I have for 2013.

The survey is pretty straight forward, take less than 5 minutes and is very important to help to define the blog content for 2013.

Thank you,
Andreano Lanusse

PS: You can also access the survey directly from this link http://bit.ly/peal2013en

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/survey-2013-help-to-define-the-content-for-my-blog-in-2013/feed/ 1
Delphi XE3 and C++Builder XE3 Hotfixes 1, 2 and 3 http://www.andreanolanusse.com/en/delphi-xe3-and-cbuilder-xe3-hotfixes-1-2-and-3/ http://www.andreanolanusse.com/en/delphi-xe3-and-cbuilder-xe3-hotfixes-1-2-and-3/#comments Thu, 27 Sep 2012 06:50:15 +0000 http://www.andreanolanusse.com/en/?p=870 Three new hotfixes are available for Delphi XE3 and C++Builder XE3. Hotfix 1 – addresses an issue with ShowMessage in a FireMonkey application on certain locales on Mac OS X – download Hotfix 2 – addresses issues with the GestureManager in a FireMonkey application – download Hotfix 3 – For Professional edition only, addresses an issue in […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Three new hotfixes are available for Delphi XE3 and C++Builder XE3.

  • Hotfix 1 – addresses an issue with ShowMessage in a FireMonkey application on certain locales on Mac OS X – download
  • Hotfix 2 – addresses issues with the GestureManager in a FireMonkey application – download
  • Hotfix 3 – For Professional edition only, addresses an issue in using SQLite driver on the Professional edition – download

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/delphi-xe3-and-cbuilder-xe3-hotfixes-1-2-and-3/feed/ 2
NO Rave Reports in Delphi XE3 and C++Builder XE3 http://www.andreanolanusse.com/en/no-rave-reports-in-delphi-xe3-and-cbuilder-xe3/ http://www.andreanolanusse.com/en/no-rave-reports-in-delphi-xe3-and-cbuilder-xe3/#comments Sun, 16 Sep 2012 06:14:01 +0000 http://www.andreanolanusse.com/en/?p=865 In case Rave Reports is the report solution for your Delphi or C++Builder applications, you will find out that Rave Reports is no longer there. Delphi and C++Builder developers has been complain for a while about Nevrona support, this is not different now. At this point Nevrona didn’t released Rave Reports for XE3 and there […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
In case Rave Reports is the report solution for your Delphi or C++Builder applications, you will find out that Rave Reports is no longer there. Delphi and C++Builder developers has been complain for a while about Nevrona support, this is not different now. At this point Nevrona didn’t released Rave Reports for XE3 and there is no news on their website.

FastReport has been present in Delphi and C++Builder since XE2 and it’s part of XE3, of course you are thinking about the painful migration process, time and resource necessarily to make the migration. The time and resource is something that only you will be able to determine, the migration of your reports can be done through FastReport. FastReport provide a tool that convert reports created with Rave, QuickReport and ReportBuilder to FastReport. I tried this convertor last year and I was able to migrate a simple report from Rave to FastReport, give a shoot and see how complex reports can be converted using this tool.

In case you have problems to convert your Rave reports, visit FastReports forum. If you already converted reports through the Fast Report convertor, please share your experience on the comment session, it will help others.

Also, you always has the possibility to choose other report solution, for example: Report Builder (commercial), FortesReport (free and open source) and others

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/no-rave-reports-in-delphi-xe3-and-cbuilder-xe3/feed/ 9
Delphi Third Party Alliance and Delphi XE3 EULA reverted http://www.andreanolanusse.com/en/delphi-third-party-alliance-facebook-group/ http://www.andreanolanusse.com/en/delphi-third-party-alliance-facebook-group/#comments Mon, 03 Sep 2012 04:36:04 +0000 http://www.andreanolanusse.com/en/?p=861 Delphi Third Party Alliance I just got an invitation to join a Facebook group called “Delphi Third Party Alliance”, based on the group description the goal is “promote a healthy Delphi Third Party ecosystem and user community”. I like this idea, there are some many components out there and this group can be a good […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Delphi Third Party Alliance

I just got an invitation to join a Facebook group called “Delphi Third Party Alliance”, based on the group description the goal is “promote a healthy Delphi Third Party ecosystem and user community”. I like this idea, there are some many components out there and this group can be a good way to share what is available with the Delphi Community.

The group is administrated by several third party vendors, it’s an open group and I think anyone can join, check the link http://www.facebook.com/groups/DelphiThirdPartyAlliance/

Third parties are joining forces.

Delphi XE3 EULA reverted

Embarcadero just notify their Technology Partners about the final EULA for XE3, they reverted the decision that would affect new users for develop Client/Server applications with Delphi Pro.

See below the communication sent by Embarcadero to their Technology Partners, also the new EULA details.

We now have a final license agreement. There should be nothing in the final EULA – when it is truly finalized in the RTM version – that should cause any problems for partners or our customers. The license (EULA) is basically similar to the XE2 file. The EULA (which is included with every shipping product) will become “final” when the we sign off the release to manufacturing build. We have included portions of the final EULA below. Note that any Professional edition restrictions still included are only related only to the use of “dbExpress” technology and do not restrict the use of technolgy partner or other 3rd party client/server or multi-tier technologies by Professional edition customers.


ADDITIONAL LICENSE TERMS APPLICABLE TO STARTER EDITION

In the event Licensee has obtained a Starter Edition license the following terms hereby apply. Licensee may use the Product to develop software (i) for which Licensee does not charge directly or indirectly a fee or receive other consideration including but not limited a license fee, a service fee, a development fee, a consulting fee, a subscription fee, a support fee, a hosting fee or the like and (ii) for which Licensee only charges fees (including but not limited a license fee, a service fee, a development fee, a consulting fee, a subscription fee, a support fee, a hosting fee or the like) that cumulatively, on an annual basis, do not exceed USD$1000. In the event any (for profit or non-profit) company elects to license the software then (i) the total company revenues may not exceed USD$1000 and (ii) the total number of Starter Edition licenses deployed may not exceed 5.

ADDITIONAL LICENSE TERMS APPLICABLE TO SOFTWARE LICENSED FOR EDUCATIONAL USE

In the event Licensee has obtained an educational license the following terms apply. Licensee may exercise Licensee’s rights under this Agreement to use the Product and to create Works solely for Licensee’s own personal use in providing or receiving instruction within the limited scope of guided computer programming and/or software training courses in which Licensee are a direct and personal participant, either as student or instructor (“Courses”). Licensee may only reproduce, distribute and use Works, in source or object code form, to other participants of the Courses and then only for educational or training purposes. Licensee may not use the Products or Works created with the products for any commercial, business, governmental or institutional purpose of any kind, except to the extent Licensee are an instructor teaching a Course. All rights not specifically granted to Licensee herein are retained by Licensor.

ADDITIONAL LICENSE TERMS APPLICABLE TO RAD STUDIO, DELPHI AND C++BUILDER,
PROFESSIONAL AND PROFESSIONAL ACADEMIC EDITIONS

In the event Licensee has obtained a RAD Studio, Delphi or C++Builder Professional, or Professional Academic product license then the following terms apply.

Subject to the terms and conditions of this Agreement, Licensor grants to Licensee as the licensed user of the Product the limited right to use that portion of the Product identified as “dbExpress”, in executable form only, to access a local database installed on the same machine as the Work. Licensee may not use that portion of the Product identified as “dbExpress” in association with a database located on a different machine other than the machine on which the Works are installed.

CLIENT/SERVER PACK

If licensee has purchased a Client/Server Pack, the Licensee of RAD Studio, Delphi, or C++Builder XE3 Professional Edition (“Product”) may deploy that portion of the Product identified as “dbExpress” and dbExpress enterprise database drivers, in executable form only, to enable client server database access. Embarcadero may deliver the Product identified as “Enterprise,” however Licensee is licensed to use only the “Professional” edition features plus “dbExpress” and the Enterprise dbExpress database drivers in a client/server configuration. Licensee may evaluate the n-Tier DataSnap functionality included in the Enterprise Product delivered, but may not deploy or redistribute DataSnap.

 

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/delphi-third-party-alliance-facebook-group/feed/ 3
Controversial changes in the EULA for Delphi XE3 and C++Builder XE3 http://www.andreanolanusse.com/en/controversial-changes-in-the-eula-for-delphi-xe3-and-cbuilder-xe3/ http://www.andreanolanusse.com/en/controversial-changes-in-the-eula-for-delphi-xe3-and-cbuilder-xe3/#comments Wed, 29 Aug 2012 08:16:09 +0000 http://www.andreanolanusse.com/en/?p=857 As everybody knows Delphi XE3 will be released soon, some previews have been already published and there are some controversial topics around XEe, mostly because of leaks from people that clearly violated the NDA and this is shameful. The biggest controversy is the new license agreement (EULA) that leaked this week, where new users can […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
As everybody knows Delphi XE3 will be released soon, some previews have been already published and there are some controversial topics around XEe, mostly because of leaks from people that clearly violated the NDA and this is shameful.

The biggest controversy is the new license agreement (EULA) that leaked this week, where new users can only use the Delphi Professional Edition to access local database, either with the Delphi components or third parties, to develop applications Client/Server applications new users will have to use Enterprise edition or higher, or by the Client/Server Addon for Professional Edition. If you own a license from Delphi 1 to Delphi XE2 you will not be affected by this new restriction.

Here what the EULA said:

. the use of data access technologies for client/server
connectivity will no longer be allowed in the Professional edition.
This includes both Embarcadero and 3rd party solutions. Professional
users may only, legally, access local databases with their applications.

Users who want to use client/server database access can purchase a
Client/Server Add-On Pack for their Professional edition or purchase
an Enterprise, Ultimate or Architect edition product.

This restriction if for new licenses only. Users upgrading to XE3
will be “grandfathered” in that they will be able to continue to use
3rd party data access technologies for client/server database access
in version XE3 ..

 

Embarcadero haven’t official released the product and there are some open questions about the definition of new users. Here an example, let’s say you own a Delphi 2006 Professional today and want to upgrade to XE3 Professional, in this case you ARE NOT elegible for upgrade because you DON’T own one of the last 3 Delphi version, so you will have to buy a new license (“new user”). Based on this example and the new EULA, here come the question are you considered a “new user” or “upgraded user”? This is just one of many situations I can think right now and will beed to be clarified.

Besides all of this, the third party vendors (Embarcadero Technology Partners) certainly will be affected by this new restriction, we have today several third party providing database access technology to access Oracle, SQL Server, DB2, etc., and mostly used by developers that own Delphi Professional licenses.

The controversy is gigantic, Embarcadero’s forum has more them 300 replies in a single thread, several other blogs about the topic with lot’s of comments.

At least I can see some positive thing on all of this, Embarcadero now knows what many Delphi developers are thinking about this change and can start measuring the impact before release XE3 or make changes before the official announcement.

What are your thoughts on that?

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/controversial-changes-in-the-eula-for-delphi-xe3-and-cbuilder-xe3/feed/ 17
Delphi XE3, C++Builder XE3, Prism XE3 and HTML5 Builder is coming!!! http://www.andreanolanusse.com/en/delphi-xe3-cbuilder-xe3-prism-xe3-and-html5-builder-is-coming/ http://www.andreanolanusse.com/en/delphi-xe3-cbuilder-xe3-prism-xe3-and-html5-builder-is-coming/#comments Wed, 15 Aug 2012 08:02:41 +0000 http://www.andreanolanusse.com/en/?p=854 Embarcadero just announced RAD Studio XE3 World Tour, which will show the new versions of Delphi, C++Builder, Prism and the  “new” HTML5 Builder. This new version will bring some new features related with the new Windows 8 UI, which Microsoft called Metro and will call something else as they release Windows 8, FireMonkey and others stuffs […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Embarcadero just announced RAD Studio XE3 World Tour, which will show the new versions of Delphi, C++Builder, Prism and the  “new” HTML5 Builder.

This new version will bring some new features related with the new Windows 8 UI, which Microsoft called Metro and will call something else as they release Windows 8, FireMonkey and others stuffs that will be announced later.

I will be posting my thoughts about this new version as soon Embarcadero release that. This is going to be my first independent and imparcial review about a new version since I left Embarcadero, stay tuned.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/delphi-xe3-cbuilder-xe3-prism-xe3-and-html5-builder-is-coming/feed/ 5
Caching data on DataSnap Server http://www.andreanolanusse.com/en/caching-data-on-datasnap-server/ http://www.andreanolanusse.com/en/caching-data-on-datasnap-server/#comments Wed, 01 Aug 2012 15:41:56 +0000 http://www.andreanolanusse.com/en/?p=499 DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application requests the same data thousands of times every day. You will have to touch the database every time. Let’s assume this data doesn’t change very often, like list of countries, states or cities. […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
DataSnap memory management is very powerful and a key DataSnap feature to implement cache solution. Imagine the scenario where the client application requests the same data thousands of times every day. You will have to touch the database every time. Let’s assume this data doesn’t change very often, like list of countries, states or cities.

When caching is implemented for this scenario, the first request to get the data from the database keeps it in memory. On the second and following requests the server will get the data from memory and return to the client. In other words, you just touch the database one time.

The combination between DataSnap memory management, DBXReader and ClientDataSet are what you need to implement a caching solution.

The DataSnap memory management is defined on the DSServerClass component using the LifeCycle property, which you can define as:

  • Server → One class instance is used per server, all clients get the same class instance from the server (Singleton)
  • Session → One class instance is used per DataSnap Session, each client get your own instance from the server (Statefull).
  • Invocation → One class instance is used per invocation method (Stateless), here you can decide when create and destroy the class.

Looking the LifeCycle property, you see that you can implement a cache solution per client (Session) or per server (Server) just by changing this property.

Let’s see how we can implement a caching solution using the scenario where I need to cache the list of states; this data is in the table STATE in this case.

My Server Class is a DSServerModule (class name TDMDataSet5) and contains 2 private and 1 public methods, which are:

private
   function GetRecords(Fields, Table: String): TDBXReader;
   function GetData(Cds : TClientDataSet; Fields, Table: String) : TDBXReader;
public
   function GetState: TDBXReader;

GetRecords will execute the query against the database and return the records as DBXReader, this method doesn’t implement any logic to check if the cache is already filled.

function TDMDataSet5.GetRecords(Fields, Table: String): TDBXReader;
var
    cmd: TDBXCommand;
begin

    cmd := DMServerContainer.GetConnection.DBXConnection.CreateCommand;
    try
      cmd.Text := 'Select ' + Fields + ' from ' + Table;
      Result := cmd.ExecuteQuery;
    except
      raise;
    end;
end;

Since DBXReader is unidirectional we can’t keep the data in memory, the solution is to copy and maintain the data in a ClientDataSet.

GetData is an internal method responsible to create and maintain the data in a cache, and return the data as DBXReader.

Looking at the implementation below, the method will get the data from the database (GetRecords) only if the ClientDataSet is not active, in other words we never had the data in the cache and it will be executed only one time. After the IF statement, the TDBXDataSetReader class will copy the data from ClientDataSet to DBXReader and return that.

function TDMDataSet5.GetData(Cds: TClientDataSet; Fields, Table: String): TDBXReader;
var
    Reader : TDBXReader;
begin
    if not Cds.Active then // Not active means, never move the data to ClientDataSet – no cache
      begin
      Reader := GetRecords(Fields, Table);
      TDBXDataSetReader.CopyReaderToClientDataSet( Reader, Cds );
      Reader.Free;
      Cds.Open;
    end;

    Result := TDBXDataSetReader.Create(Cds, False (* InstanceOwner *) );
end;

You may ask why I’m copying the data from ClientDataSet to DBXReader and not return the ClientDataSet directly. Two reasons:

  • I can’t marshal/unmarshal ClientDataSet as a JSON object
  • DataSnap converts DBXReader into JSON when the server methods are invocated through REST interfaces.

An important point here, the DSServerModule TDMDataSet5 will manage the cache. If I define the LifeCycle for this class as server it means only one cache instance for all clients “global cache”, defining it as Session means that I’m creating a cache for each client connected to the server.

On the client side using a native client as example we will get a DBXReader, it is up to your application to decide what to do with the data, but if you need to connect to this data with data-aware components, you just need to copy the DBXReader data into ClientDataSet, the TDBXDataSetReader.CopyReaderToClientDataSet method is the solution for that.

   TDBXDataSetReader.CopyReaderToClientDataSet(Reader, CDSCity);

If your data related with the State table change you have to implement a server method to refresh the data. Also using LifeCycle as Server the cache will be destroyed at the moment you stop the server, but if you use LifeCycle as Session the cache will be destroyed when the client disconnect to the server.

Using this technique you garanty the cache on the server side independent of the client implementation, also I would like to remember this solution works for DataSnap Servers, if you are using DataSnap REST interface you won’t have cache because every server request works as invocation lifecycle.

This is one realistic example to explain how to implement cache on DataSnap Server using data from database as example, also you learned how to move data from/to ClientDataSet to/from DBXReader.

You can download the source code sample here, look at the unit DataSetDM5.pas (Server) and FormDataSet5 (client).

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/caching-data-on-datasnap-server/feed/ 6
Agile the next chapter http://www.andreanolanusse.com/en/agile-the-next-chapter/ http://www.andreanolanusse.com/en/agile-the-next-chapter/#comments Mon, 30 Jul 2012 07:45:09 +0000 http://www.andreanolanusse.com/en/?p=846 It has been two months since my last blog post and lot of stuff going on in the meantime. I want to start saying thanks to everyone for all the message via comments here on my blog and e-mails sent direct to em, it’s such a good felling when we have our work recognized and rewarding to know […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
It has been two months since my last blog post and lot of stuff going on in the meantime. I want to start saying thanks to everyone for all the message via comments here on my blog and e-mails sent direct to em, it’s such a good felling when we have our work recognized and rewarding to know that I could help many developers around the world, once again thanks everyone.

Since then I have been super busy on my new job at Rally Software. Rally is the leader in Agile ALM and one of the major supporters of the agile movement. Rally’s ALM solution is fully based on Agile methodology, web-based, provide integration with many IDE’s, requirement management systems, source control management and much more.

Beyond the software development topics already covered here in my blog, agile methodologies will become part of my favorite topics, where I will discuss agiles values, the importance of teamwork, leadership applied to the agile and non-agile world, and other related subjects.

For those of you that has been following me for awhile, probably remember the Borland ALM times where we not only discuss about software development, but also about ALM Tools,  methodologies and processes, mostly of the discussions centric on waterfall model, which today is heavy, expensive and exceeded model in most cases.

Now on my new world I will bring the agile perspective and when possible compare with other models, clarifying the respective advantages and disadvantages, benefits, challenges, etc. .. Also, be able to share the Rally’s agile experience will be something unique, agile is  rooted in the culture of the company and this is a very important element when a organization starts the transformation to agile. Knowing this I will be sharing here on my blog several articles to make your team an agile team, show how Rally can help on this process and discuss SCRUM and Kanban frameworks.

See you on my next blog post and don’t forget to follow me on Twitter @andreanolanusse

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/agile-the-next-chapter/feed/ 4
Bye Bye Embarcadero!!! http://www.andreanolanusse.com/en/bye-bye-embarcadero/ http://www.andreanolanusse.com/en/bye-bye-embarcadero/#comments Tue, 01 May 2012 21:01:16 +0000 http://www.andreanolanusse.com/en/?p=839 Dear developers, My Borland history began in Brazil on December of 1995, had so many chapters (Borland/Inprise/CodeGear/Embarcadero), a new and important chapter started in December of 2006 when I moved to the United States and today this chapter comes to an end. Today is my last day at Embarcadero Technologies. I would like to thank […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Dear developers,

My Borland history began in Brazil on December of 1995, had so many chapters (Borland/Inprise/CodeGear/Embarcadero), a new and important chapter started in December of 2006 when I moved to the United States and today this chapter comes to an end. Today is my last day at Embarcadero Technologies.

I would like to thank all of you around the world for the great time we shared together during all of this years, for all the conversations face-to-face, online, by email or phone. I have been your advocate during all of this years was something unique and enjoyable, something I will always take with me.

The 17 years of Delphi was only possible because of the support of this energetic community, keep sending your feedbacks to Embarcadero, specially now with FireMonkey, which has a long way to go.

This blog will continue and software development will continue to be the predominant topic here. My videos on YouTube will continue and I expected to publish other videos as well. Finally you can continue or start following me on Twitter @andreanolanusse

I will be around and you can contact me here or via e-mail andreano AT gmail DOT com

Now is time to start writing the next chapter and look for new opportunities, that I expect to be challenging and fun.

Sincerely,

Andreano Lanusse

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/bye-bye-embarcadero/feed/ 37
Update 4 for Delphi XE2 and C++Builder XE2 is now available http://www.andreanolanusse.com/en/update-4-for-delphi-xe2-and-cbuilder-xe2-is-now-available/ http://www.andreanolanusse.com/en/update-4-for-delphi-xe2-and-cbuilder-xe2-is-now-available/#comments Tue, 28 Feb 2012 21:53:38 +0000 http://www.andreanolanusse.com/en/?p=812 Another update for Delphi XE2 and C++Builder XE2, this time Update 4 and it requires uninstalling your existing RAD Studio product before installing the update. You can obtain this update in any of the following three ways: Upgrading via the Automatic Upgrade Mechanism Manually Checking for Updates Downloading from the Registered Users Web Page You […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Another update for Delphi XE2 and C++Builder XE2, this time Update 4 and it requires uninstalling your existing RAD Studio product before installing the update.

You can obtain this update in any of the following three ways:

You can see all the changes and enhancements related to this release here.

Two important features I would like to highlight: Mac print support using the FireMonkey Printing API and now DataSnap Mobile Connector generate proxy for FreePascal.

You can download the Delphi XE2 and C++Builder XE2 ISO with Update 4 here.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/update-4-for-delphi-xe2-and-cbuilder-xe2-is-now-available/feed/ 8
Using Regular Expression on C++Builder FireMonkey Application http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/ http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/#respond Fri, 06 Jan 2012 22:11:14 +0000 http://www.andreanolanusse.com/en/?p=768 Here another C++ example showing how to use the RTL regular expression on C++Builder FireMonkey Application. This example  validate a string content based on four different regular expression, which are: Checks if the given text is a validate e-mail address Checks if the given text contains a valid IP address Checks if the given text […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
Here another C++ example showing how to use the RTL regular expression on C++Builder FireMonkey Application.

This example  validate a string content based on four different regular expression, which are:

  • Checks if the given text is a validate e-mail address
  • Checks if the given text contains a valid IP address
  • Checks if the given text is a valid date (dd-mm-yyyy)
  • Checks if the given text is a valid date (mm-dd-yyyy)

The follow code shows the four regular expressions used by this application.

void __fastcall TForm1::lbRegExpChange(TObject *Sender) {
	switch (lbRegExp->ItemIndex) {
	case 0:
		lbType->Text = "E-mail for validation";

		MemoRegEx->Text =
			"^((?>[a-zA-Z\d!#$%&''*+\\-/=?^_`{|}~]+\\x20*" "|\"((?=[\\x01-\\x7f])[^\"\\\\]|\\\\[\\x01-\\x7f])*\"\\"
			"x20*)*(?\.?[a-zA-Z\d!" "#$%&''*+\\-/=?^_`{|}~]+)+|\"\"((?=[\\x01-\\x7f])"
			"[^\"\\\\]|\\\\[\\x01-\\x7f])*\")@(((?!-)[a-zA-Z\\d\\" "-]+(?)$";

		break;
	case 1: {
			// Accept IP address between 0..255
			lbType->Text = "IP address for validation (0..255)";
			MemoRegEx->Text =
				"\\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\" ".(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\."
				"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\." "(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\b";
			break;

		}
	case 2: {
			// Data interval format mm-dd-yyyy
			lbType->Text =
				"Date in mm-dd-yyyy format from between 01-01-1900 and 12-31-2099";
			MemoRegEx->Text =
				"^(0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[" "01])[- /.](19|20)\\d\\d$";
			break;

		}
	case 3: {
			// Data interval format mm-dd-yyyy
			lbType->Text =
				"Date in dd-mm-yyyy format from between 01-01-1900 and 31-12-2099";
			MemoRegEx->Text =
				"^(0[1-9]|[12][0-9]|3[01])[- /.](0[1-9]|1[01" "2])[- /.](19|20)\\d\\d$";
			break;

		}
	}
	EditTextChangeTracking(EditText);

}

To execute the validation you can use the method TRegExp::IsMatch as you can see bellow:

void __fastcall TForm1::EditTextChangeTracking(TObject *Sender) {
       // EditText contain the string value and MemoRegEx the regular expression
	if (TRegEx::IsMatch(EditText->Text, MemoRegEx->Text)) {
		SEResult->ShadowColor = TAlphaColors::Green;
	}
	else
		SEResult->ShadowColor = TAlphaColors::Red;

}

Since this is a FireMonkey Application, I used a Shadow Effect to show if the Edit box value is valid or not (Green=valid / Red=invalid). The following image shows what happen when you input a invalid e-mail address on Windows and Mac.

Now the results when you provide the correct e-mail address.

You can download the source code from here or just update your local RAD Studio XE2 samples folder from our RAD Studio SVN repository.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/using-regular-expression-on-cbuilder-firemonkey-application/feed/ 0
Using dbExpress Framework on Windows and Mac with C++Builder http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/ http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/#comments Fri, 06 Jan 2012 10:33:58 +0000 http://www.andreanolanusse.com/en/?p=763 During the following weeks I’m writing a series of C++ examples to demonstrate the use of VCL, FireMonkey, RTL, dbExpress, and others stuff. Each example will have a major focus, but you will be able to learn other stuffs as well. If there is something specific on C++ you would like to see, please let […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
During the following weeks I’m writing a series of C++ examples to demonstrate the use of VCL, FireMonkey, RTL, dbExpress, and others stuff. Each example will have a major focus, but you will be able to learn other stuffs as well. If there is something specific on C++ you would like to see, please let me know and I will do my best to bring that in one of my following posts.

In this first post I demonstrate how to use dbExpress Framework to run SQL’s against your database. Since I want to run the application on Windows and Mac, the console application will target FireMonkey.

The Console Application Wizard for C++ has been updated in C++Builder XE2, adding a Target Framework Option as you can see below.

The following code shows how to connect to an InterBase database, execute a SELECT SQL against the COUNTRY table, and display the results, of course you can use dbExpress Framework to run queries against any database supported by dbExpress, just remember that some dbExpress drivers are not available on Mac in XE2, for example SQL Server and ODBC drivers.

If you are C++ developer you will understand pretty quickly the following code, which has some comments to help you to understand the code.

#include <fmx.h>

#pragma hdrstop
#pragma argsused

#include <tchar.h>
#include <stdio.h>
#include <System.SysUtils.hpp>
#include <Data.DBXDynalink.hpp>
#include <Data.DBXCommon.hpp>
#include <Data.DBXInterbase.hpp>
#include <memory>

int _tmain(int argc, _TCHAR* argv[]) {

	// Get database connection instance
	std::auto_ptr<TDBXConnection>conn
		(TDBXConnectionFactory::GetConnectionFactory()->GetConnection
		("EMPLOYEE", "sysdba", "masterkey"));

	if (conn.get() != NULL) {

		printf("================= Connection Properties ============\n");

		AnsiString s = conn->ConnectionProperties->Properties->Text + "\n";
		printf(s.c_str());

		// create command and transaction objects to execute the query
		std::auto_ptr<TDBXCommand>command(conn->CreateCommand());

                // initiate a transaction
		TDBXTransaction *transaction =
			conn->BeginTransaction(TDBXIsolations::ReadCommitted);

		command->Text = "SELECT * FROM Country";
		command->Prepare();

		// execute the query and get the cursor (DBXReader)
		std::auto_ptr<TDBXReader>reader(command->ExecuteQuery());

		// print number of columns and each record
		printf(AnsiString("Number of Columns:" + IntToStr(reader->ColumnCount) +
			"\n").c_str());

		// display the list of records
		while (reader->Next()) {
			printf((reader->Value[reader->GetOrdinal("COUNTRY")]->GetAnsiString
				() + "\n").c_str());
		}

		printf("====================================================\n");

		conn->CommitFreeAndNil(transaction);
	}

	Sleep(5000);
	return 0;
}

Before you run this code, make sure you have the dbExpress alias EMPLOYEE setup to connect into the EMPLOYEE.GDB database and the InterBase client installed, if everything is ok just compile and run the program on Windows and Mac, the following image shows this application running on Mac.

There are few things you need to be aware when deploying and running this kind of application on Mac; on my following post I will explain everything about that.

For now we’ve learned how to use DBX Framework and make the application to compile and run on Windows and Mac.

You can download the source code from here or just update your local RAD Studio XE2 samples folder from our RAD Studio SVN repository.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/using-dbexpress-framework-on-windows-and-mac-with-cbuilder/feed/ 2
Android apps connected to C++Builder DataSnap Server http://www.andreanolanusse.com/en/android-apps-connected-to-cbuilder-datasnap-server/ http://www.andreanolanusse.com/en/android-apps-connected-to-cbuilder-datasnap-server/#comments Thu, 22 Dec 2011 01:48:16 +0000 http://www.andreanolanusse.com/en/?p=747 As part of the 31 days of RAD Studio XE2 Tutorials, in today’s video I’m showing how you can create DataSnap REST Server in C++Builder, expose server methods and call them from an Android application. The video shows all the steps to create the server and the Android application. This is a short recap of […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
As part of the 31 days of RAD Studio XE2 Tutorials, in today’s video I’m showing how you can create DataSnap REST Server in C++Builder, expose server methods and call them from an Android application. The video shows all the steps to create the server and the Android application.

This is a short recap of the video.

In order to have other platforms connecting and interacting with your DataSnap Server you need to enable the REST Interface, and for mobile platforms you can use the DataSnap Connectors that generate proxy classes for Android, BlackBerry, Windows Phone and iOS. In the video I’m showing how to create the Server, let’s take a look at the Server Method implementation.

The first server method called InsertCountry, connect on my InterBase database and add a new record to the Country table, see the implementation below:

bool TServerMethods1::InsertCountry(String country, String currency,
	String &error) {
	TDBXCommand *comm;

	bool result = false;
	DbConn->Open();
	comm = DbConn->DBXConnection->CreateCommand();
	comm->CommandType = TDBXCommandTypes_DbxSQL;

	TVarRec vr[] = {country, currency};
	comm->Text =
		Format("Insert Into Country (COUNTRY, CURRENCY) Values ( '%s', '%s')", vr, 2);

	if (!comm->IsPrepared) {
		comm->Prepare();
	}

	try {
		comm->ExecuteUpdate();
		result = true;

	}
	catch (Exception* e) {
		error = e->Message;
	}
	delete comm;
	return result;

}

The second server method is called GetCountries, and returns all the records I have in the COUNTRY table on my InterBase database. This method returns a DBXReader and DataSnap will convert this automatically to JSON at the moment the Android app calls this method, but since we will use the new DataSnap Connector to generate the proxy class, we won’t need to handle the JSON object and I will explain that after.

The following code represents the GetCountries implementation.

TDBXReader* TServerMethods1::GetCountries() {

	TDBXCommand *comm;

	try {
		DbConn->Open();
		comm = DbConn->DBXConnection->CreateCommand();
		comm->CommandType = TDBXCommandTypes_DbxSQL;
		comm->Text = "Select * from Country";

		if (!comm->IsPrepared) {
			comm->Prepare();
		}
		return comm->ExecuteQuery();
	}
	catch (Exception* e) {
		return NULL;
	}
}

The next step is to create the proxy class for Android using the DataSnap connectors, which is a new feature in C++Builder XE2. The generation can be done through command line or via HTTP request on your DataSnap server, and in the video I’m showing how to do that.

The proxy generator generates only the DSProxy.java, all the other files part of the DataSnap Connectors are the representation of DataSnap Framework in Java, for example you won’t need to parse the DBXReader as JSON object in Java, just because we have the DBXReader class in Java and it parses the JSON object for you.

The first step to create a REST connection with your DataSnap Server, which will give me a instance of DSRESTConnection. If your DataSnap Server requires authentication you can use the methods SetUserName and SetPassword to define the credentials.

	private DSRESTConnection getConnection() {
		DSRESTConnection conn = new DSRESTConnection();
		conn.setHost("192.168.254.128");
		conn.setPort(8080);
		return conn;
	}

Now, let’s take a look and see how to execute the server methods, starting with the InsertCountry method as you can see in the following code.

After instantiation of the DSRESTConnection, we pass the REST connection object to the TServerMethods1’s instance, which is the client representation of TServerMethods1 on the server, and from there just call InsertCountry.

Since InsertCountry returns Boolean and also the Error message parameter is passed as reference, InsertCountry methods will return a InsertCountryReturns, which is a static class with two parameters: error that represent the error message and returnValue which represent the value return by InsertCountry.

protected void Insert() {

	DSRESTConnection conn = getConnection();

	TServerMethods1 sm = new TServerMethods1(conn);

	try {
		InsertCountryReturns ret;
		ret = sm.InsertCountry(editCountry.getText().toString(), editCurrency.getText().toString(), "");

		if ( ! ret.returnValue ) {
			System.out.println(ret.error);
		}

	} catch (DBXException e) {
		e.printStackTrace();
	}

	// Hide keyboard
	InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
	imm.hideSoftInputFromWindow(editCountry.getWindowToken(),0);

}

The next method is GetCountries. We start as before by getting the DSRESTConnection instance. The GetCountries method returns a DBXReader and the way we work with the DBXReader class in Java is very similar the way we work in C++, use the Next method to interact through the result, and getValue/GetAsXXXXX to get the column value. See the following code:

protected void Refresh() {

	DSRESTConnection conn = getConnection();

	TServerMethods1 sm = new TServerMethods1(conn);

	TDBXReader reader;
	try {
		reader = sm.GetCountries();

		ArrayList COUNTRIES = new ArrayList();

		while (reader.next()) {
			COUNTRIES.add(reader.getValue("COUNTRY").GetAsString());
		}

		// Add the COUNTRIES array in to the list view
		list.setAdapter(new ArrayAdapter(this, android.R.layout.simple_list_item_1, COUNTRIES));

	} catch (DBXException e) {
		e.printStackTrace();
	}

}

This is just a short tutorial explaining how to use DataSnap Connector with Android, take some time and watch the video where I’m going through more details.

The source code is available for download here and download the video from here.

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/android-apps-connected-to-cbuilder-datasnap-server/feed/ 8
CopyReaderToClientDataSet, Blob and the message “Feature not implemented” http://www.andreanolanusse.com/en/copyreadertoclientdataset-blob-and-the-message-feature-not-implemented/ http://www.andreanolanusse.com/en/copyreadertoclientdataset-blob-and-the-message-feature-not-implemented/#comments Fri, 04 Nov 2011 00:25:18 +0000 http://www.andreanolanusse.com/en/?p=729 If you have used the method TDBXDataSetReader.CopyReaderToClientDataSet, you probably came across with the message “Feature not implemented”, this exception occurs because the method CopyReaderToClientDataSet can’t copy Blob fields from the DBXReader to the ClientDataSet. This is no longer a problem, Delphi XE2 Update 2 changed this behavior and now supports Blob text fields when using the CopyReaderToClientDataSet […]

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
If you have used the method TDBXDataSetReader.CopyReaderToClientDataSet, you probably came across with the message “Feature not implemented”, this exception occurs because the method CopyReaderToClientDataSet can’t copy Blob fields from the DBXReader to the ClientDataSet.

This is no longer a problem, Delphi XE2 Update 2 changed this behavior and now supports Blob text fields when using the CopyReaderToClientDataSet method. The Blog binary support is not implemented yet.

To learn how to use the method CopyReaderToClientDataSet read the article “Copying data from ClientDataSet to DBXReader

Andreano Lanusse | Technology and Software Development Follow me on Twitter: @andreanolanusse

]]>
http://www.andreanolanusse.com/en/copyreadertoclientdataset-blob-and-the-message-feature-not-implemented/feed/ 2