Type
PSendSmsInfo = ^TSendSmsInfo;
TSendSmsInfo = Record
Mobile:string;
Msg:string;
MsgId:string;
end; ARecord:PSendSmsInfo;
MsgList:TList;
New(ARecord);
ARecord^.MsgId :=inttostr(nMsgIndex);
ARecord^.Mobile:=RegMonthUser.FieldValues['Mobile'];
ARecord^.Msg :=TB_Message.FieldValues['Message'];
MsgList.Add(ARecord);请问为什么到最后一句会出现错误:
Invalid variant type conversion
是什么原因?急啊
PSendSmsInfo = ^TSendSmsInfo;
TSendSmsInfo = Record
Mobile:string;
Msg:string;
MsgId:string;
end; ARecord:PSendSmsInfo;
MsgList:TList;
New(ARecord);
ARecord^.MsgId :=inttostr(nMsgIndex);
ARecord^.Mobile:=RegMonthUser.FieldValues['Mobile'];
ARecord^.Msg :=TB_Message.FieldValues['Message'];
MsgList.Add(ARecord);请问为什么到最后一句会出现错误:
Invalid variant type conversion
是什么原因?急啊
那应该不会有错的,建议先随便add几个常量进链表看会不会报错,我怀疑是你数据类型的问题。