Hi, I've encountered some issues when using *FTS4 MATCH* on a database, like the one mentioned in the subject (*malformed MATCH expression: [( "a*" OR b*)]*). >From what I discovered it is triggered by using a quote at the beginning of a parenthesis, if I write *(b* OR "a*")* it works just fine. What I found interesting is that if I use Navicat with the SQLite database, the query above works just fine. Also there is support for " NOT " opposed to " - " supported by System.Data.SQLite.
*this is the syntax I used to get the data:* DataTable dt = new DataTable(); using (SQLiteCommand cmd = mySQLiteConn.CreateCommand()) { cmd.CommandType = CommandType.Text; cmd.CommandText = sql; SQLiteDataAdapter sqlDa = new SQLiteDataAdapter(cmd); sqlDa.Fill(dt); } *exception detail:* System.Data.SQLite.SQLiteException was unhandled Message=SQLite error malformed MATCH expression: [("a*" OR b*)] Source=System.Data.SQLite ErrorCode=-2147467259 StackTrace: at System.Data.SQLite.SQLite3.Reset(SQLiteStatement stmt) at System.Data.SQLite.SQLite3.Step(SQLiteStatement stmt) at System.Data.SQLite.SQLiteDataReader.NextResult() at System.Data.SQLite.SQLiteDataReader..ctor(SQLiteCommand cmd, CommandBehavior behave) at System.Data.SQLite.SQLiteCommand.ExecuteReader(CommandBehavior behavior) at System.Data.SQLite.SQLiteCommand.ExecuteDbDataReader(CommandBehavior behavior) at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at SQLite_Take2.Form1.ftsSearch() in D:\c#\SQLite Take2\Main.cs:line 607 at SQLite_Take2.Form1.cmdSearch_Click(Object sender, EventArgs e) in D:\c#\SQLite Take2\Main.cs:line 340 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) at System.Windows.Forms.Application.Run(Form mainForm) at SQLite_Take2.Program.Main() in D:\c#\SQLite Take2\Program.cs:line 18 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: *I use:* Windows 7 , 64bit Visual Studio 2010 SQLite Server version : 3.7.7.1 Connection string: "Data Source=.\temp.db;UTF8Encoding=True;Version=3" System.Data.SQLite.dll version : 1.0.74.0 -- *Stefan Rogin* Webdesigner Tel: +40.769.622.178 _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users