'DBEngine.Idle dbRefreshCache' ERROR 
Author Message
 'DBEngine.Idle dbRefreshCache' ERROR

Access 2000
Statement 'DBEngine.Idle ' is not giving any errors.
Why am I getting error 'Variable not defined' in the statement:
'DBEngine.Idle dbRefreshCache'

References I have are:
- Visual Basic for Applications
- Microsoft Access 9.0 Object Library
- OLE Automation
- Microsoft ActiveX Data Objects 2.5 Library
- Microsoft ActiveX Data Objects Recordset 2.5 Library
- Microsoft ADO Ext. 2.5 for DDL and Security

Thanks,
Waldemar



Sun, 02 Nov 2003 06:02:10 GMT  
 'DBEngine.Idle dbRefreshCache' ERROR
Waldemar,

DBengine is part of the DAO object model. You must set a reference to DAO.

------
Graham R Seach MCP Microsoft Access

------


Quote:
> Access 2000
> Statement 'DBEngine.Idle ' is not giving any errors.
> Why am I getting error 'Variable not defined' in the statement:
> 'DBEngine.Idle dbRefreshCache'

> References I have are:
> - Visual Basic for Applications
> - Microsoft Access 9.0 Object Library
> - OLE Automation
> - Microsoft ActiveX Data Objects 2.5 Library
> - Microsoft ActiveX Data Objects Recordset 2.5 Library
> - Microsoft ADO Ext. 2.5 for DDL and Security

> Thanks,
> Waldemar



Sun, 02 Nov 2003 07:58:27 GMT  
 'DBEngine.Idle dbRefreshCache' ERROR
Graham,
Is there an equivalent command in ADO so I do not have to set reference to DAO?
Thanks,
Waldemar
Quote:
-----Original Message-----

Waldemar,

DBengine is part of the DAO object model. You must set a reference to DAO.

------
Graham R Seach MCP Microsoft Access




Mon, 03 Nov 2003 23:17:14 GMT  
 'DBEngine.Idle dbRefreshCache' ERROR
Waldemar,

Sorry, I don't know of any. That doesn't mean there isn't one - just that I
don't know of it. Maybe one of the experts can answer that question.

------
Graham R Seach MCP Microsoft Access

------


Graham,
Is there an equivalent command in ADO so I do not have to set reference to
DAO?
Thanks,
Waldemar

Quote:
-----Original Message-----

Waldemar,

DBengine is part of the DAO object model. You must set a reference to DAO.

------
Graham R Seach MCP Microsoft Access




Tue, 04 Nov 2003 09:38:47 GMT  
 'DBEngine.Idle dbRefreshCache' ERROR
The 'variable' dbRefreshCache is undefined; it's a constant exported by the
DAO library - set a reference to:  

\Program Files\Common Files\Microsoft Shared\DAO350.dll

As you have included several libraries, exporting database objects with very
similar names, I'd suggest that you use fully-qualified references all
through your code, eg:

Dim rstStocks as DAO.Recordset
Dim qdfCGtax as DAO.QueryDef
Dim dbPortfolio as DAO.Database
Dim dblCharge as Double
Set dbPortfolio = DAO.DBEngine.DBEngine.OpenDatabase(strMdbPath, False)
set qdfCGtax = dbPortfolio.QueryDefs("qryCapitalGains")  

qdfCGtax.Parameters("CutoffDate") = Cvdate("04-Apr-" & Year(Now()))

set rstStocks = qdfNewIssues.Openrecordset

rstStocks.MoveFirst    'fails if rst is an ADO object
DAO.DBEngine.BeginTrans
Do until rstStocks.EOF
   dblCharge = funcCGT(rstStocks!HoldingID, rstStocks!Type2)
   rstStocks.Edit
        rstStocks!Charges = rstStocks!Charges + dblCharge
        rstStocks!CGTflag = True
   rstStocks.Update
rstStocks.MoveNext
Loop  
DAO.DBEngine.CommitTrans

It's a chore (call me paranoid if you like) but code without explicit
references will fail on someone's PC (a lot of machines assume, for example,
that Recordsets are ADO)... And there is no guarantee - none at all - that
next years' up-to-the-minute Office and Windows PC will have data access
class libraries that do what you were expecting *any* DAO (or ADO!) object to
do in this years' applications.

Regards -

Nigel Heffernan


Quote:

>Access 2000
>Statement 'DBEngine.Idle ' is not giving any errors.
>Why am I getting error 'Variable not defined' in the statement:
>'DBEngine.Idle dbRefreshCache'

>References I have are:
>- Visual Basic for Applications
>- Microsoft Access 9.0 Object Library
>- OLE Automation
>- Microsoft ActiveX Data Objects 2.5 Library
>- Microsoft ActiveX Data Objects Recordset 2.5 Library
>- Microsoft ADO Ext. 2.5 for DDL and Security

>Thanks,
>Waldemar

 -----  Posted via NewsOne.Net: Free (anonymous) Usenet News via the Web  -----
  http://newsone.net/ -- Free reading and anonymous posting to 60,000+ groups
   NewsOne.Net prohibits users from posting spam.  If this or other posts



Sat, 08 Nov 2003 23:00:29 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. DBEngine.Idle dbRefreshCache

2. Help!, SQL 'DELETE' locks my tables and DBEngine.Idle doesn't free them

3. 'idle loop'?

4. runtime error '429' ActiveX component can't create object when DBengine.RepairDatabase is coded

5. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

6. Run-time error '-2147417846 (8001010a)': Automation error (error 440)

7. DoEvents and DBEngine.Idle questions

8. MDB Lock during readonly snapshot and DBEngine.Idle????

9. Runtime error ''800a01b6''

10. dbEngine (0)(0) doesn't always work in 7.0

11. Can't compile DBEngine calls into an exe

12. DBEngine.SystemDB can't be assigned

 

 
Powered by phpBB® Forum Software