SAP HANA + DELPHIXE2

SAP HANA and DelphiXE2 MDX Error

I was amused since I first heard about the new SAP HANA and how they used In-Memory Computing to to be able to manage huge amount of data in just a few milliseconds.

SAP HANA is a game-changing, real-time platform for analytics and applications that can provide significant processing speed while handling real big data… this demo video shows what SAP HANA can do… they used a Kinect device to do hands free data manipulation in a “Minority Report” style and they can actually query and sort 13million out of 3.2billion records in less then one second!! Wow!

With more and more ultra-books around, In-Memory Computing is definitely the future of huge and “not so huge” databases! What comes next?! SAP and Oracle are already fighting for this new world of Database possibilities and we can see sparks going on

What about a trial?! When ordinary people, non-SAP clients (like me and probably you too) will be able to use SAP Hana?!

I had to wait until last week when I finally received my approval and access information from SAP In-Memory Developer Center. Now I got a 30 days of trial access to a hosted HANA test and evaluation environment hosted by CloudShare. And what happens if I really like this?! I can get my own SAP HANA DB server on Amazon Web Services.

I followed the first steps of the SAP HANA Database – Development Guide to configure my server, download and import some sample data.

As a Delphi lover and a Embarcadero Evangelist I wanted to demonstrate a DelphiXE2 application fetching data from the SAP HANA server. So I configured an ODBC using the HDBODBC driver, got the connection string into an TADOConnection component and what a great surprise I was able to connect to the server!

Now lets try to run a Query with a simple select statement… Added a TADOQuery component to the form and correctly linked a TDatasource and TDBGrid components… compiled my DelphiXE2 application and downloaded it to my virtual-machine hosted on CloudShare…

At this point i get an error message that says “Error occurred while executing a MDX statement. The message is: Syntax Erro: Select * from “SFLIGHT”<<<<”

What I don’t understand is why!?! the SQL statement was copied from SAP Hana Studio and runs OK there!

Well its more about midnight now and I need some sleep… so by now I’ll leave you guys with this problem in mind and some pictures showing some basic steps and results… I think we are really close to figure it out and be able to publish some first performance results regarding DelphiXE2 and SAP Hana integration… so send me an email or tweet if you want me to send you the complete DelphiXE2 source code for the demo project, help is always welcome!

8 Responses

    • victory says:

      Well… I just copied the SQL statement from HANA Studio and the same code works fine there… Querying from MS-Excel works fine too… Tomorow I’ll try a connection different from ADO component in Delphi and see what happens!

  1. Christinan Wirth says:

    Have you ever figured this out? Maybe you can give the HANA OLEDB MDX Provider a try?

    (Create a*.udl file, open it, in the driver tab select HANA MDX…, enter you connection details, save, open the file in a text editor and you got the connection string)

    I struggeling as well, trying to connect from .NET… Good luck :) !

    • victory says:

      Hello Christinan,

      Well I kind of gave up on this after trying many different alternatives! On Delphi I tried ADO and dbExpress connectors… with and HANA OLEDB MDX provider… if you have success on the .NET connection just let me know.

      Victory Fernandes
      @victoryjorge

  2. Mark says:

    It would seem that your connection is doing an OLAP multidimensional query (hence the MDX error), and the query you are trying to give is a standard SQL query. You need a standard ODBC, not an OLEDB MDX connector for this to work as you expect.

  3. Pat Buxton says:

    Victory,

    I thought I’d post the solution as I came across your post whilst searching for ideas myself.
    It appears that you set up an 64bit ODBC connection with the 64bit driver HDBODBC. Delphi is only 32bit so you have to install the 32bit HANA Client Tools alongside which install the HDODBC32 driver. Then setup the 32bit ODBC from %SYSTEM%\SYSWOW64\ODBCAD32.exe

    With this done, I can query the tables no problem.

    I hope this helps other Delphi users.

    • Pat Buxton says:

      I forgot to include my ConnectionString for reference:

      Provider=MSDASQL.1;Password=P@ssw0rd;Persist Security Info=True;User ID=SYSTEM;Data Source=HDBTEST32

    • Victory Fernandes says:

      Hey Pat,

      Thanks for the reply… with this in mind I will give it a try again… we are still in time for the DelphiConferenceBrazil2013 and if everything goes ok I will be able to show Delphi+HANA for the 1st time there! (around 700 developers gathered each year)

Leave a Reply

*