MySQL5 - Stored procedures

Forum related to MySQL

Moderators: gto, cipto_kh, EgonHugeist

bravecobra
Junior Boarder
Junior Boarder
Posts: 29
Joined: 31.10.2005, 00:09
Location: Antwerp
Contact:

Post by bravecobra »

Is there a way of "converting" that IZResultset to a TDataset on zdbc level? Basically that's what TZAbstractRODataset does, not?

In ZDbcMySQLStatement I found that

Code: Select all

TZMySQLStatement.ExecuteQuery
....
Result := CreateResultSet(SQL); //Yeah, ok but the last one plz!! ;)
Can we have some code here that loops it till the end (if wanted). I tried adding the repeat unitl loop here but that breaks the normal working of TZQuery and related components.
Visor123
Fresh Boarder
Fresh Boarder
Posts: 22
Joined: 07.09.2005, 10:20
Location: Dnepr

Post by Visor123 »

The mysql error after open in query CALL ProcedureName();

CR_COMMANDS_OUT_OF_SYNC

method GetMoreResults not work with CALL (((
Version 6.6.2
SVN rev. 267
v-maguryan
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 06.02.2008, 12:40
Contact:

It is BUG

Post by v-maguryan »

The BUG in source code ZEOS library in unit ZDbcMySqlResultSet.

Try to change this source code and then try to test STORED PROCEDURES:

Code: Select all

procedure TZMySQLResultSet.Close; 
begin 
  if FQueryHandle <> nil then begin 
    FPlainDriver.FreeResult(FQueryHandle); 
    while FPlainDriver.RetrieveNextRowset( FHandle) = 0 do begin 
      FQueryHandle := FPlainDriver.StoreResult(FHandle); 
      if Assigned(FQueryHandle) then 
        FPlainDriver.FreeResult(FQueryHandle); 
    end; 
  end; 
  FQueryHandle := nil; 
  FRowHandle := nil; 
  inherited Close; 
end; 
Post Reply