mydac

Coverting a TMyQuery dataset to TClientDataSet in Delphi

泄露秘密 提交于 2019-12-11 00:42:52
问题 I make use of the Mydac components by devart (corelab) to access MySql from Delphi (2006) Very often I need to work with data in a TClientDataSet What is the best way to convert the dataset of a TMyQuery to TClientDataSet Currently I am using var MyQuery : TMyQuery; Dsp : TDataSetProvider; Cds : TClientDataSet; begin MyQuery := nil; Dsp := nil; Cds := nil; try MyQuery := TMyQuery.Create(nil); Dsp := TDataSetProvider.Create(nil); Cds := TClientDataSet.Create(nil); MyQuery.Connection :=

Return value of stored functions in MyDAC

谁都会走 提交于 2019-12-08 13:39:49
问题 I am working with Devart's MyDac and MySQL Server 5.0.41. Here is a section from the documentation on executing stored procedures with TMyConnection.ExecProc : Note: Stored functions unlike stored procedures return result values that are obtained internally through the RESULT parameter. You will no longer have to provide anonymous value in the Params array to describe the result of the function. The stored function result is obtained from the Params[0] indexed property or with the ParamByName