DAO Error 3265 - technical - help! 
Author Message
 DAO Error 3265 - technical - help!

ACC97: I have an insert (append) query that uses an extremely simple
user-defined function to plug a value into a column based on a global
variable. The query takes two named parameters, defined and data-typed
explicitly. When I just execute the query it runs just fine.

I also have a fairly complex function that causes the same append query to
iterate a varying number of times with varying parameter values. The
iteration all happens within a transaction to preclude partial updates.

The problem is that sometimes the complex function triggers the DAO 3265
error, "Undefined function 'MyFunction' in expression.", where MyFunction is
the name of the simple function referenced in the first line of this post.
Other times it works just fine. I cannot detect a pattern.

Here are the clues I have:

1) The error is triggered the first time the complex function references the
Parameters collection of the QueryDef object that represents the append

    qdf.Parameters("FarOutPeriod").Value = strFarOutPeriod

2) When I inspect the parameters collection of the instantiated QueryDef in
the debug window, expanding the tree view for the QueryDef object, I see
that there is only one property - Count - referenced for the Parameters
collection, and that the value for THAT, for some strange reason, is where
the DAO error is living. Is that bizarre, or what?

This is a screen capture from the debug window:

Expression    :    Value    :    Type
  - : Parameters :  : Parameters/Parameters
          : Count : <Undefined function 'GetSpan' in expression.> : Integer

3) The function either works or it doesn't. I.e., the error does not seem to
be dependent on the particular data being processed by the function at any
given moment.

Does anyone have any ideas about this???

Thanks in advance!
- Tony

Tony Scilipoti
Applications Development Lead
Brigham Surgical Group
Brookline, Massachusetts USA

Sun, 17 Jun 2001 03:00:00 GMT  
 DAO Error 3265 - technical - help!
The actual error number is 3085, as you have all figured out by now I am
sure. Sorry. Everything else still stands.

- Tony

Sun, 17 Jun 2001 03:00:00 GMT  
 DAO Error 3265 - technical - help!
More follow-up:

I understand that you are theoretically not able to manipulate in DAO
queries that call user-defined functions. However, how come it DOES work
sometimes, and how come it's only when I try to use the parameters
collection that the error is triggered?

- Tony

Mon, 18 Jun 2001 03:00:00 GMT  
 [ 3 post ] 

 Relevant Pages 

1. DAO error 3265

2. ADO error 3265

3. Error 3265:Item not found in this collection

4. Error 3265 Item not found in this collection

5. Run time error 3265

6. Errors 3265 & 3186

7. Errors 3265 & 3186

8. error 3265 when accessing odbc data source through data control

9. Error 3265, item missing from collection

10. Run Time Error 3265

11. 3265 runtime error, item not found in collection

12. ADO error 3265


Powered by phpBB® Forum Software