sp; bsSkinListBox1.Items.Add( 'AT+CSCA="' + SMSC + '"' + chr(13)); end;} // //发送短信命令 AT+CMGS=pdu串长度(十进制) bsSkinMemo2.Lines.Add(ATCOMMAND+IntToStr(lenall)+chr(13)); bsSkinListBox1.Items.Add(ATCOMMAND+IntToStr(lenall)+chr(13)); // // 发送短信Pdu串 // smsDate := SendDatahead +IntToHex(len,2)+ smsDate; smsDate := smsDate+chr(26) ;//正式进取消9999+'0039003900390039',为防止测试时发出。 bsSkinMemo2.Lines.Add(smsDate); bsSkinListBox1.Items.Add(smsDate); if ((leftstr(smsDate,6)='003100')) or ((leftstr(smsDate,6)='005100') and (midstr(smsDate,39,2)=midstr(smsDate,41,2))) then begin //插入发送记录 ADOCommandvar_input.CommandText:='insert into sendSMS(senddate, sendto, sendSMS) values(:senddate, :sendto, :sendSMS)'; ADOCommandvar_input.Parameters[0].Value:=FormatDateTime('YYYY-mm-dd HH:mm:ss',now()); ADOCommandvar_input.Parameters.Value:=unExchangeCode(midstr(smsDate,11,12)); ADOCommandvar_input.Parameters.Value:=sendSMSstr; ADOCommandvar_input.Execute; end; begin end;&nbs