This question is locked. New answers and comments are not allowed.
considering this example:-
it gives me all stores of exceptions such as "Telerik.OpenAccess.RT.sql.SQLException: Could not find stored procedure ''" and "Telerik.OpenAccess.RT.sql.SQLException: Index and length must refer to a location within the string."
if i change querystring so that it is all on a single line, it works fine:-
string querystring = @"SELECT Name, Author FROM Books";
i've tried all sorts of things with the sql to get it to work, but nothing does.
is there a good reason this shouldn't work?
thanks,
aleks
public IList<Book> Example() { IList<Book> books = new List<Book>(); string querystring = @"SELECT Name, AuthorFROM Books"; IQuery query = factory.Context.Scope.GetSqlQuery(querystring, null, null); IQueryResult qres = query.Execute(); foreach (object[] item in qres) { books.Add(new Book() { Name = item[0] == null ? "" : item[0].ToString(), Author = item[1] == null ? "" : item[1].ToString() }); } return books; }it gives me all stores of exceptions such as "Telerik.OpenAccess.RT.sql.SQLException: Could not find stored procedure ''" and "Telerik.OpenAccess.RT.sql.SQLException: Index and length must refer to a location within the string."
if i change querystring so that it is all on a single line, it works fine:-
string querystring = @"SELECT Name, Author FROM Books";
i've tried all sorts of things with the sql to get it to work, but nothing does.
is there a good reason this shouldn't work?
thanks,
aleks