Hi ,
I'm trying to SET a ClientDataSet in Redis, but i'm getting AccessViolationError when i call &SET function.
For storing ClientDataSet in Redis , i'm converting ClientDataSet into Bytes and then i'm calling &SET function.
Below is the code which i have used ,
_.......
.......
FRedis: IRedisClient;
CDS : TClientDataSet;
CDSArray : Array of TClientDataSet;
.......
.......
procedure TForm1.BtnSetCDS(Sender: TObject);
var
Byte_Val : Array of TBytes;
CDSArray : Array of TClientDataSet;
begin
SetLength(CDSArray,1);
SetLength(Byte_Val,1);
CDSArray[0] := CDS;
SetLength(Byte_Val[0],Sizeof(CDS));
Move(CDSArray[0], Byte_Val[0], Sizeof(CDS));
FRedis.&SET(cds.Name,Byte_Val[0]); //Getting access violation error at this point
end;
.............
............._
I don't know where i made mistake , please help me on this.
Thank you.
Hi , I'm trying to SET a ClientDataSet in Redis, but i'm getting AccessViolationError when i call &SET function. For storing ClientDataSet in Redis , i'm converting ClientDataSet into Bytes and then i'm calling &SET function. Below is the code which i have used , _....... ....... FRedis: IRedisClient; CDS : TClientDataSet; CDSArray : Array of TClientDataSet; ....... ....... procedure TForm1.BtnSetCDS(Sender: TObject); var Byte_Val : Array of TBytes; CDSArray : Array of TClientDataSet; begin SetLength(CDSArray,1); SetLength(Byte_Val,1); CDSArray[0] := CDS; SetLength(Byte_Val[0],Sizeof(CDS)); Move(CDSArray[0], Byte_Val[0], Sizeof(CDS)); FRedis.&SET(cds.Name,Byte_Val[0]); //Getting access violation error at this point end; ............. ............._
I don't know where i made mistake , please help me on this. Thank you.