Friday, December 21, 2012

Different Ways to Search for SQL Server Database Objects

Leave a Comment
In the course of any database development project, searching for database objects is something you will probably do.  It can be any kind of search which is done using some text as the search mechanism. Some of the examples of search that a developer / DBA may make within a database or database server are: searching for a database object, searching for occurance of particular text within database objects, searching within the schema...
Read More...

Checking Internet Connection

Leave a Comment
The Microsoft WinINet API enables applications to access standard Internet protocols, such as FTP and HTTP. Many of you want to know if a computer has an active Internet connection before trying to connect to the internet using some communication interface. We can determine it by using one of WinINet function for check the status of internet connection in a computer.   Private Declare Function InternetGetConnectedState Lib "wininet" _   (ByRef conn As Long, ByVal val As Long) As Boolean InternetGetConnectedState...
Read More...

How to send email from VB.NET (Old Style but work every where)

Leave a Comment
VB.NET using SMTP protocol for sending email . SMTP stands for Simple Mail Transfer Protocol . VB.NET using System.Net.Mail namespace for send mail . We can instantiate SmtpClient class and assign the Host and Port . The default port using SMTP is 25 , but it may vary different Mail Servers .In the following example shows how to send an email from a Gmail address. create new class name MailMsg.vb and put bellow code in that class,create object of class like dim objMail as new MailMsg Send Mail using SendMail(). #Region...
Read More...

How to send email from VB.NET

Leave a Comment
VB.NET using SMTP protocol for sending email . SMTP stands for Simple Mail Transfer Protocol . VB.NET using System.Net.Mail namespace for send mail . We can instantiate SmtpClient class and assign the Host and Port . The default port using SMTP is 25 , but it may vary different Mail Servers .In the following example shows how to send an email from a Gmail address. Imports System.Net.Mail Public Class Form1     Private Sub Button1_Click(ByVal sender As System.Object, _     ByVal e As System.EventArgs)...
Read More...

Thursday, December 20, 2012

How to add Connection string in Config file (.Net)

Leave a Comment
Step 1:     Right Click on project->Add->New Item->General     Select “Application Configuration File” and click on “Add” Step 2:     Add bellow section in config file and change DatabaseName,Database,Username,Password according to connect server </configuration>     <appSettings>         <add key="ConnectionString" value="Data Source=Persist Security Info=True;Initial Catalog=DatabaseName;Data Source=DatabasePath;User...
Read More...