New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CreateRowCountCommand throw unrecognized token exception when the SectionExpression column is chinese data #2

Closed
sdhjl2000 opened this Issue Mar 4, 2013 · 1 comment

Comments

Projects
None yet
2 participants
@sdhjl2000

sdhjl2000 commented Mar 4, 2013

        protected virtual SQLiteCommand CreateRowCountCommand (int section)
        {
            string query = "select count (*) from \"" + TableName + "\"";
            object[] args;

            if (SectionExpression != null) {
                SQLiteWhereExpression where = new SQLiteWhereExpression ();
                SQLiteAndExpression and = new SQLiteAndExpression ();

                and.Add (new SQLiteEqualToExpression (SectionExpression, SectionTitles[section]));//did not work when use inlineisexpress with chinese
                if (SearchExpression != null && SearchExpression.Expression != null)
                    and.AddRange (SearchExpression.Expression);

                where.Expression = and;

                query += " " + where.ToString (out args);
            } else if (SearchExpression != null) {
                query += " " + SearchExpression.ToString (out args);
            } else {
                args = new object [0];
            }

            return Connection.CreateCommand (query, args);
        }

change SQLiteInlineIsExpression with SQLiteEqualToExpression fix this problem

@jstedfast

This comment has been minimized.

Show comment
Hide comment
@jstedfast

jstedfast Mar 10, 2013

Owner

Thanks. This is fixed in git master, now.

Owner

jstedfast commented Mar 10, 2013

Thanks. This is fixed in git master, now.

@jstedfast jstedfast closed this Mar 10, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment