How to send C# SMS from MySQL database

How to send C# SMS from MySQL database


hello everyone today I will show you an
advanced SMS sending solution previously I showed how you can send SMS
from a database or a single C# application using SMS
gateway now you can learn how you can connect to
database to an SMS Gateway and how you can send or receive an SMS
with a Windows application written in c# using the database
It is useful for sending notifications or alerts in
SMS the prerequisites are following to use
this solution an SMS gateway a service provider
connection database user in SMS gateway a
MySQL database server ODBC database driver. let’s see how you
can create this solution in your system first you will need to create a MySQL
database you can create one with the PHPMyAdmin database manager this is an open source software intended
to handle the administration of MySQL over the web to create a database click on SQL button then add “create database database; command to the field so in this example our database will be called “databasesms” now you have to create two tables which
sends and receives the SMS messages click on
the database SMS then the SQL button copy the source code from the two tables
from the Ozekisms.com website now click on database and you will see
the two tables the “ozekimessagein” for the incoming
and the “ozekimessageout” for outgoing SMS messages. To connect the database to SMS Gateway you have to install database user in Ozeki NG SMS Gateway. you can do it by clicking on the Add
User in the user interface click on the database user and give a name for the connection let’s
keep the “databasesms” for this example change the connection string depending
on the database you wish to use in this case choose the ODBC type then create the connection string you can see the code here now my ODBC version is 5.2w I give my IP address and I modify name of my database and the authentication data now if you finish with this you can set
up sending and receiving options. You can change the polling
interval and you can set how many messages can be
polled in a time if you’re finished with the setup click
on the OK button and the SMS gateway will connect to the
database finally you have to create the C#
application in this example I’m using premade
application but I will describe the details I open the example in Visual Studio you can see the SMS sender application here now let’s see the codes this row creates the MySQL connection in
these rows you can set that the text of the message and the phone number of the recipient will
be in a text format in the next four hours you can add the
authentication data to the database in this row you can see what the string will contain in case of successful connection the application inserts the following
strings: then you can see command which runs
application if the message has been sent
successfully message box will come up now let’s try our new application click on the Save button and press the
f5 partly the start debugging in button. The
application starts let’s add the phone number of the
recipient and the text of the message you can see a message box saying that the message was inserted into a
database. You can check it in the SMS gateway and the database. And that’s all if you still
have any questions please let me know. If this video is useful
for you subscribe to our channel to receive
notifications about our newest guides. The Ozeki NG SMS
gateway too powerful flexible software which is
almost compatible with all programming language you wish to use. The integration of the software to your system is easy and fast with the
software you can send even 500 SMS messages per
second try it yourself download a trial version
and send out your first message today! If you need more information please visit
our website the Ozekisms.com or write us an
email to [email protected]

Danny Hutson

6 thoughts on “How to send C# SMS from MySQL database

  1. hi, i just want to know how to send sms to mobile phone let say i want to send examination result where user dont have to request but the system will read the result from database and send to mobile phone. can I used ozeki for this system and how to do it. thank you

  2. how can we send a message to particular phone when the database is
    updated.for example when the result website is updated,student needs to
    get the only his notification to his mobile without request..

  3. HI ! congratulations for the videos . i have a ASP aplication with MYSQL DB and i do all steps (ODBC,create the tables )sucesss full but my only problem is to conect ozeking to my ZTe routeur https://sg.carousell.com/p/zte-mf920v-4g-150mbps-direct-sim-card-wifi-hotspot-126434705/ could some one help please

Leave a Reply

Your email address will not be published. Required fields are marked *