This question is locked. New answers and comments are not allowed.
Can someone please help me? I have been trying to get Telerik support to help me with this for over 24 hours now with no response. I am very disappointed with the support of OpenAccess. All the other products are so well supported and responses are so quick!
I have a Data project for my entity classes and a web project for my site. I followed the Telerik best practices example to set this up. My issue is that no matter what I do I can't seem to get OpenAccess's scope code to connect and brin back data. I get the following exception everytime, even for the simplest linq expression.
When I hover over the var that I have declared fr the OQL it says "Telerik.OpenAccessQuery #2 not executed" and then if I let it continue I get the error mentioned below.
BackendQuery = '(query).BackendQuery' threw an exception of type 'Telerik.OpenAccess.RT.QueryBuilderImp.QueryBuildingException'
base {System.Exception} = {"Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Invalid column name 'user_name'.\r\nInvalid column name 'user_id'.\r\nInvalid column name 'application_id'.\r\nInvalid column name 'is_anonymous'.\r\nInvalid column name 'last_activity_date'.\...
BackendError = {"Invalid column name 'user_name'.\r\nInvalid column name 'user_id'.\r\nInvalid column name 'application_id'.\r\nInvalid column name 'is_anonymous'.\r\nInvalid column name 'last_activity_date'.\r\nInvalid column name 'lowered_user_name'.\r\nInvalid column n...
I get a similar error message no matter what table I try.
Something as simple as this query in my aspx page does not work.
My aspx page code used to looked like this:
Please can someone help me with this!!
Thanks in advance.
Aniket
I have a Data project for my entity classes and a web project for my site. I followed the Telerik best practices example to set this up. My issue is that no matter what I do I can't seem to get OpenAccess's scope code to connect and brin back data. I get the following exception everytime, even for the simplest linq expression.
When I hover over the var that I have declared fr the OQL it says "Telerik.OpenAccessQuery #2 not executed" and then if I let it continue I get the error mentioned below.
BackendQuery = '(query).BackendQuery' threw an exception of type 'Telerik.OpenAccess.RT.QueryBuilderImp.QueryBuildingException'
base {System.Exception} = {"Error executing query: Telerik.OpenAccess.RT.sql.SQLException: Invalid column name 'user_name'.\r\nInvalid column name 'user_id'.\r\nInvalid column name 'application_id'.\r\nInvalid column name 'is_anonymous'.\r\nInvalid column name 'last_activity_date'.\...
BackendError = {"Invalid column name 'user_name'.\r\nInvalid column name 'user_id'.\r\nInvalid column name 'application_id'.\r\nInvalid column name 'is_anonymous'.\r\nInvalid column name 'last_activity_date'.\r\nInvalid column name 'lowered_user_name'.\r\nInvalid column n...
I get a similar error message no matter what table I try.
Something as simple as this query in my aspx page does not work.
string Parentlastname = "EVANS"; |
var query = from o in cachedScope.Extent<Family>() |
where o.Parentlastname.Equals(Parentlastname) |
select o; |
My aspx page code used to looked like this:
using System; |
using System.Web.Security; |
using Telerik.OpenAccess; |
using Tutoring.Data; |
using System.Web; |
public partial class login : System.Web.UI.Page |
{ |
private IObjectScope cachedScope; |
protected void Page_Init(object sender, EventArgs e) |
{ |
cachedScope = ((login_MasterPage)Master).Scope; |
} |
protected void Page_Load(object sender, EventArgs e) |
{ |
} |
protected void Login1_LoggedIn(object sender, EventArgs e) |
{ |
cachedScope.Transaction.Begin(); |
Tutoring.Data.DBUser currentUser = Tutoring.Data.BLL.DBUserManager.GetItemByName(Login1.UserName, cachedScope); |
if (currentUser != null) |
{ |
SessionHandler.Userid = currentUser.UserId; |
SessionHandler.Applicationid = currentUser.ApplicationId; |
SessionHandler.Siteid = currentUser.Sites[0].Siteid; |
if (currentUser.Teachers.Count > 0) |
{ |
SessionHandler.Teacherid = currentUser.Teachers[0].Teacherid; |
SessionHandler.Tutoring = currentUser.Teachers[0].Tutoring.Value; |
} |
else |
{ |
SessionHandler.Teacherid = Guid.Empty; |
SessionHandler.Tutoring = true; |
} |
} |
cachedScope.Transaction.Commit(); |
HttpCookie cookie = new HttpCookie("Tutoring"); |
cookie.Expires = DateTime.Now + new TimeSpan(1, 0, 0); |
cookie.Values.Add("userid", SessionHandler.Userid.ToString()); |
cookie.Values.Add("siteid", SessionHandler.Siteid.ToString()); |
cookie.Values.Add("applicationid", SessionHandler.Applicationid.ToString()); |
cookie.Values.Add("teacherid", SessionHandler.Teacherid.ToString()); |
cookie.Values.Add("tutoringacct", SessionHandler.Tutoring.ToString()); |
Response.Cookies.Add(cookie); |
FormsAuthentication.RedirectFromLoginPage(Login1.UserName, true); |
} |
} |
Please can someone help me with this!!
Thanks in advance.
Aniket