Error 3265 executing Query (1 Viewer)

KACJR

Registered User.
Local time
Today, 19:32
Joined
Jul 26, 2012
Messages
81
Greetings to the well of knowledge...


Not sure of where I should post this, so posting it here.



I recently upgraded my SQL Server back-end from 2008R2 to 2017. I am now trying to get my existing front-ends working using 2017.


I have encountered one issue. I have some code that executes a stored query using DoCmd.OpenQuery. Sometimes, but not always, this command throws Error 3265 generated by DAO.QueryDefs. I set a breakpoint just before this command and inspected the stored query to ensure that all fields are properly defined...all appear to be, and I can preview the results of the query.


Would this be some fallout from the migration from 2008R2 to 2017?


Thanks,
Ken
 
Last edited:

CJ_London

Super Moderator
Staff member
Local time
Today, 23:32
Joined
Feb 19, 2013
Messages
16,553
would love to help but no idea what error 3265 is. Suggest you post the error description
 

KACJR

Registered User.
Local time
Today, 19:32
Joined
Jul 26, 2012
Messages
81
would love to help but no idea what error 3265 is. Suggest you post the error description


Oops, sorry, my bad.


Error 3265 was generated by DAO.QueryDefs
Item not found in this collection.
 

CJ_London

Super Moderator
Staff member
Local time
Today, 23:32
Joined
Feb 19, 2013
Messages
16,553
ok - implies a field is missing or not identified - what is the sql to the query. Perhaps you have two fields from different tables with the same name. Other causes can be a null value somewhere in your data
 

KACJR

Registered User.
Local time
Today, 19:32
Joined
Jul 26, 2012
Messages
81
OK, figured it out.
With SQL Server 2017, there is a different DAO library that needs to be loaded into Access (under References in the VBA Editor). Once I figured that out, the rest was gravy!
 

Users who are viewing this thread

Top Bottom