+ Reply to Thread
Results 1 to 14 of 14

Error on line set pvtCache = dbRecordset.recordset

  1. #1
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Exclamation Error on line set pvtCache = dbRecordset.recordset

    Hi,

    I am getting an error "Application-defined or object-defined error : 1004" on the highlighted line below.

    Please Login or Register  to view this content.
    I cannot use ADODB or DAO because I am on Win 64-bit machine. But it should still work I assume so what is it that I am doing wrong here?

  2. #2
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Error on line set pvtCache = dbRecordset.recordset

    Can anyone please help me out with this?

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error on line set pvtCache = dbRecordset.recordset

    Quote Originally Posted by fadydaddy View Post
    I cannot use ADODB or DAO because I am on Win 64-bit machine.
    what do you mean by that? the recordset has to be one or the other, and you need ADO as far as I know (you have DAO)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Error on line set pvtCache = dbRecordset.recordset

    Whenever I declare Dim dbRecordset as ADODB.Recordset, it doesn't compile. However I am able to do my operations if I use the Access Object Library. But why am I getting this error?

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error on line set pvtCache = dbRecordset.recordset

    you need to set a reference to the 'microsoft activex data objects library' to use ADO. like I said, you can't use a dao recordset for a pivotcache as far as I know.

  6. #6
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Error on line set pvtCache = dbRecordset.recordset

    Well, that I can't. Win 64 bit does not compile ADO.

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error on line set pvtCache = dbRecordset.recordset

    that's just not true.

  8. #8
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Error on line set pvtCache = dbRecordset.recordset

    Please Login or Register  to view this content.
    If I use this code (with references set to ADODB library 6.0) then I get runtime error 3706 for application defined or object defined error on the line
    Please Login or Register  to view this content.

  9. #9
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error on line set pvtCache = dbRecordset.recordset

    you need to use the microsoft.ace.oledb.12.0 provider.

  10. #10
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Error on line set pvtCache = dbRecordset.recordset

    I don't have that. You see I am sitting on a Citrix desktop compiling this. There is no reference for that available.

  11. #11
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error on line set pvtCache = dbRecordset.recordset

    it's not a reference - it's the provider string you should use instead of microsoft.jet.oledb.4.0

  12. #12
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Error on line set pvtCache = dbRecordset.recordset

    https://www.google.ae/#hl=en&safe=of...w=1024&bih=628you will find a lot of issues win Win 64 under these results

  13. #13
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Error on line set pvtCache = dbRecordset.recordset

    are you telling me it doesn't work? I already told you not to use the Jet provider

  14. #14
    Registered User
    Join Date
    05-31-2012
    Location
    Dubai, UAE
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Error on line set pvtCache = dbRecordset.recordset

    Quote Originally Posted by JosephP View Post
    it's not a reference - it's the provider string you should use instead of microsoft.jet.oledb.4.0
    This solved it. Thank you for your patience and help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1