Function SQLSelect() As ActionResult
Dim theconnection As New SqlConnection("Data Source=(localdb);Database=test_drive_database;")
Dim queryString As String = "SELECT * FROM ColorTable"
Dim command As New SqlCommand(queryString)
command.CommandTimeout = 15
command.CommandType = CommandType.Text
'Printing Out the SQL Result
Return ViewData("command")
End Function
I am having an empty SQL result, with no error messages.
The URL to invoke the above function is: http://localhost:1812/Home/SQLSelect
The question is, is there a way to specifically check if the SQL database has gotten opened?
The Tools Used: Visual Studio 2012, VB.NET MVC 4, Microsoft SQL Server Compact 4.0
Notice: The database name is test_drive_database, and there is no password set for the database.