I am not able to obtain results of SQL functions like SUM,MAX, LAST_INSERT_ID() with IZStatement like You can see below
Part of my code:
Code: Select all
var
sqlDotaz : string;
statement : IZStatement;
resultSet : IZResultSet;
begin
statement := dmCentral.dmCentralni.zCentrKonekt.DbcConnection.CreateStatement;
sqlDotaz := 'select Sum(pocet_volnych) from typ_materialu';
resultSet := Statement.ExecuteQuery(sqlDotaz);
sumVolnych := resultSet.GetLong(1);
Code: Select all
resultSet.GetLong(1);
TZMySQLResultSet.FRowHandle=nil but I really don't know why. Can someone please please help?