Answered by:
155 where clauses in accessdatasource??

Question
-
User-716811762 posted
I have an access table with 157 columns and 392 rows... and several dropdownlists. How do I perform a search for all columns by using one where clause for each column? [Column1] = DropDownList1.SelectedValue (...) [Column155] = DropDownList155.SelectedValue. When I run the code I get an error saying that the query is too complex.
One solution I tried was to split my original datasource in two, a first for <99 columns and the second for the rest columns. However I realized I need all the info in the same gridview or table. Any ideas? Suggestions? I use VB.NET. Thanks in advance
Monday, August 15, 2011 5:38 AM
Answers
-
User-1199946673 posted
I don't think this is gonna work using Access. The maximum number of ANDs in a WHERE clause is 99...
http://www.databasedev.co.uk/access_specifications.html#content3
Can you use SQL Server Express? If not SQL Server Compact Edition is the way to go...
http://www.dotnetspark.com/kb/3731-introduction-to-sql-server-compact-edition.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 15, 2011 5:46 AM
All replies
-
User-1199946673 posted
I don't think this is gonna work using Access. The maximum number of ANDs in a WHERE clause is 99...
http://www.databasedev.co.uk/access_specifications.html#content3
Can you use SQL Server Express? If not SQL Server Compact Edition is the way to go...
http://www.dotnetspark.com/kb/3731-introduction-to-sql-server-compact-edition.aspx
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, August 15, 2011 5:46 AM -
User-716811762 posted
Thanks @hans_v. First I thought of using MS Access because i'd like to modify data locally and this is easier on accdb. Are there such maximum where limitations using MSSQL? I'll give it a try. Thank you!!
Monday, August 15, 2011 5:51 AM -
User-716811762 posted
I don't know why i can't install it on windows 7, any other idea avoiding sql?
Monday, August 15, 2011 9:29 AM -
User-1199946673 posted
I don't know why i can't install it on windows 7Waht do you mean by "it"?
If you want to install SQL Server express/Compact and have problems with it, Start another thread in an appropiate forum...
Monday, August 15, 2011 10:20 AM -
User3866881 posted
I don't know why i can't install it on windows 7Do you want to install SQL Expression 2008? I think for so many columns, SQL is your choice. Have a try and hope this helps!
Download the SQL Express at:
https://www.microsoft.com/betaexperience/pd/SQLEXPDB32/enus/
I think it should be installed into your PC, you mean you cannot? Can you offer us your error messages or screenshot?
Thx again.
Tuesday, August 16, 2011 10:24 PM