HomeActive Query Builderdate function unsupported in SQLite expressions

date function unsupported in SQLite expressions


Hello,

The SQLite syntax provider does not get to parse the date function. The expression SELECT date('now') throws an "unexpected date symbol" message. Trying to use this expression programmatically within the WHERE clause throws this exception:

CriteriaItem expressionItem = null;
...
expressionItem.ConditionStrings[0] = "= date('now')";

ActiveDatabaseSoftware.ActiveQueryBuilder.SQLError: Bad expression
Símbolo no esperado "date" en la línea 1, posición 3.
en ActiveDatabaseSoftware.ActiveQueryBuilder.BaseSQLContext.ParseExpression(String sql)
en ActiveDatabaseSoftware.ActiveQueryBuilder.CriteriaItem.(Int32 , String )
en ActiveDatabaseSoftware.ActiveQueryBuilder.ConditionWrapper.set_Item(Int32 index, String value)
en WorkflowEngine.Messenger.ScheduledTask.DateFilter_Click(Object sender, EventArgs e) en D:\Projects\Softcode House\WorkflowEngine\WorkflowEngine.Messenger\ScheduledTask.cs:línea 938
en System.Windows.Forms.MenuItem.OnClick(EventArgs e)
en System.Windows.Forms.MenuItem.MenuItemData.Execute()
en System.Windows.Forms.Command.Invoke()
en System.Windows.Forms.Command.DispatchID(Int32 id)
en System.Windows.Forms.Control.WmCommand(Message& m)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.TextBoxBase.WndProc(Message& m)
en System.Windows.Forms.TextBox.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
en System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en ActiveDatabaseSoftware.ActiveQueryBuilder.BaseSQLContext.ParseExpression(String sql)
en ActiveDatabaseSoftware.ActiveQueryBuilder.CriteriaItem.(Int32 , String )
en ActiveDatabaseSoftware.ActiveQueryBuilder.ConditionWrapper.set_Item(Int32 index, String value)
....

Regards,
Vicente Almagro
Vicente Almagro | email
April 12 2011, 10:37 AM
Dear Vincente,

Thank you for your bug report.

The bug is fixed now. You may download the updated build.
Sergey Smagin | email
2 weeks since original post
Thank you.

Regards,
Vicente Almagro
Vicente Almagro | email
2 weeks since original post
This topic is closed