Getting "Query is too complex" or "Expression is too complex” when using Access

The scenario, you have an MS Access database and you want to run queries against it. A fairly common thing to want to do J   However, now you are getting the following exception, assuming you are running a .Net application:   System.Data.OleDb.OleDbException: Query is too complex.    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)    at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams,…

1

The importance of selecting the correct Sql provider for the job. Sqlncli vs. Sqlncli10

Imagine this; you have been looking at the new data type DateTime2 in Sql Server 2008 because you have a need for the increased precision this data type offers.   Comparison here: “SQL Server 2008 Books Online (October 2008) – datetime2 (Transact-SQL)”   http://msdn.microsoft.com/en-us/library/bb677335.aspx “SQL Server 2008 Books Online (October 2008) – datetime (Transact-SQL)”  …

1

How to update an Excel worksheet using DataSet and the OleDbDataAdapter

One very convenient thing in ADO.Net is the DataAdapters. These give you an easy way to fill DataTables and DataSets, and also to update the backing data source with very little effort. However, in order to be able to do INSERT/UPDATE/DELETE you have to set the appropriate commands for the Adapter. Ie:   OleDbDataAdapter adapter…

1

{"Syntax error in FROM clause."} when using text based datasources

This is also one of the issues that I have seen a few times. What happens here is that customer uses *.csv or *.xls or any text file as a data source and connects to it using .Net and OleDb.   The error reported from the framework when issuing a SELECT is:   {“Syntax error…

0