A simple code to create a SQL Server Database programatically using VB.NET:
You can see an example of how to Drop a database using VB.NET
Private Sub CreateDatabase(ByVal dbName As String)
Try
Dim cn As New SqlClient.SqlConnection("your connection string")
Dim com As New SqlClient.SqlCommand("create database " + dbName, cn)
cn.Open()
com.ExecuteNonQuery()
MsgBox("Database Created")
cn.Close()
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub




