INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Send SMS from PowerBuilder

Send SMS from PowerBuilder

(OP)
I'm using following code for sending SMS from Powerbuilder using a GSM Modem.
I have use Nokia 6300 cell phone as a modem and connected to Nokia PC Suite that use COM5 Port.
When i call this code my application was not responding and message has not been sent, when i was debug then application is stop response on First FileWriteEx() function call.
so please any body know about that issue then please guide me.
Thanks in advance..
the following code i was used for SMS.

integer li_FileNum
string ls_MobileNo
string ls_Message
string ls_ComPort, ls_String
string szEnd
string szCommand
Long ll_rc

ls_MobileNo = sle_mobileNo.text
ls_Message = sle_msg.text
ls_ComPort = sle_ComPort.text

szEnd = char(26)


li_FileNum = FileOpen(ls_ComPort, TextMode!,Write!,LockWrite!,Append!)
if li_FileNum > 0 then
ll_Rc = FileWriteEx(li_FileNum, "AT+CMGF=1")
FileWriteEx(li_FileNum, "~n~r")
szCommand = "AT+CMGS="
szCommand += "~""+ ls_MobileNo +"~""
FileWriteEx(li_FileNum, szCommand)
FileWriteEx(li_FileNum, "~r")
FileWriteEx(li_FileNum, ls_Message)
ll_Rc = FileWriteEx(li_FileNum, ls_String )
FileWriteEx(li_FileNum, szEnd)
FileClose(li_FileNum)
MessageBox("Sms Application" , "Sms sent successfully....")
// sle_MobileNo.text = ""
// sle_Msg.text = ""
else
MessageBox("Sms Application" , "Unable to open Com Port ....")
end if


Best Regards
Usman Ali

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close