Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Query is too complex" error

Status
Not open for further replies.

SteveHall

Programmer
Jan 4, 2001
6
GB
I have an VB6 application that has been used for 18 months by a client in several offices, some of them use Access 2000 and some use SQL Server 2000.

I am doing some changes which have increased the number of fields in one table from about 70 to 105. All works fine when using SQL Server, but when I use Access I get the above error on an update.

I only have the record I want to update in the record set, and I get the error when I issue "rs.update" on the record set.

The full error is:-

Run time error -2147467259(80004005)

Query is too complex

Any ideas?

Steve Hall
 
I'm not sure what your query looks like but I know I get that error sometimes in Access when I have several joins in the query and try to make one an outer join.
 
Sorry, didn't finish my thought. Anyway, when that happens, I have to break the query down into steps, i.e., create sub queries and join those to create the final query.
 
That's the strange thing - I haven't issued a quey. I open a recordset for the record I need, update the record form memory variables and issue an update, e.g:-

rs.open = "SELECT * FROM property where code = '01AA0001',...
rs!datafield = strdatafield
.
.
.
rs.update

Then I get the error

Steve Hall
 
The bit that follows rs.open in your code is a SQL query! Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top