I have trying to simple display data from the Umbraco database, using only Razor
But It gives error?
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
@{
var DB = Database.Open("umbracoDbDSN");
var DataTypes = DB.Query("SELECT * FROM cmsDataType");
}
@{
foreach (var item in DataTypes)
{
@item
}
}
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
DataBase Connection
Hi
I have trying to simple display data from the Umbraco database, using only Razor But It gives error?
Using this code
Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Hi
Try this
hope this help
It now complains about the Open statement and did not work
And what happens when you take the Open line out of your code?
is working on a reply...