VB.NET SQL Example: How to send SMS in VB.NET using SQL database


/ Published in: VB.NET
Save to your folder(s)

I thought I share this code snippet because I find this way of SMS sending an easy solution. I believe that even beginners can implement this VB.NET SQL SMS application, but I think some extent of perfection in the SMS technology is required for better understanding. Okay, let’s jump right in the middle of the project that allows you to send and receive SMS through database tables by using your own VB.NET application.

Project information:

• Language: VB.NET
• Level: Intermediate
• IDE: Microsoft Visual Studio
• Database server: MS SQL, MS SQL Express, MySQL, Access, Oracle, etc. I used MySQL (http://www.mysql.com/).
• Special prerequisites: .NET Framework (http://www.microsoft.com/hu-hu/download/details.aspx?id=17851), SMS Gateway (in order to let your PC to send/receive SMS transmissions to/from a telecommunications network). I used Ozeki NG (www.ozekisms.com).

Project description:

First of all, you need to create the necessary database tables: one for the outgoing messages, and another one for the incoming messages. The snippet shows my MySQL commands, but it can be changed of course depending on the database server you use. In order to be able to use your database you need to connect it to your SMS gateway, then you can insert an SMS into the table of the outgoing messages by using an SQL INSERT command. To execute this command, you need to connect to the database by using the myConnection.Open() method. Thereafter insert the message into the database ( mySqlCommand.ExecuteNonQuery() ), then close the database connection ( myConnection.Close() ). That's all there is to it! It wasn't that black magic, was it?

URL: http://www.ozekisms.com

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.