• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
April 19, 2024, 04:16:41 am

News:

SMF - Just Installed!


smssend problem

Started by hmz4848, June 21, 2008, 04:41:28 am

Previous topic - Next topic

hmz4848

  download  trial  version  nrcomm   component
and  use      nrgsm    component  to  test   it  and  then   buy  it
from  yours
but   i  have  a  problem
when  i  use      nrgsm.sendsms('mobile #',' text  of  sms',false)
in   a  loop   procedure
this   method  donot  send  any  sms
my code  is   similar  its:

while   true    do
begin
// check   table   for  any  sms   for   send
table.open;
while     not  table.eof    do
begin



nrgsm.sendsms('mobile #',' text  of  sms',false)

table.next;

end;
end;


please   help  me  for   solve  this  problem

thanks
bye

Roman Novgorodov

June 21, 2008, 01:48:28 pm #1 Last Edit: June 21, 2008, 01:51:20 pm by Roman Novgorodov
Hello

Please note that after Send() method the SMS is placed in GSM device memory and
device takes a time for send a message.

You can't call Send() method again while a previous message is not sent.

You can use TnrGsm.OnSmsSent event for wait the SMS will completely send.

There is another way. After every Send() method you can call TnrGsm.SmsSendWait() method.
It will block program while sms will be not sent or error will be returned.

Also you can add time delay (sleep(5000)) after every Send() but it is not good way.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.