Results 1 to 7 of 7

Thread: Provider cannot be found. it may not be properly installed

  1. #1
    Junior Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0

    Provider cannot be found. it may not be properly installed

    i am trying to get the values of of some MS Project fields into MS Word but i keep getting this error "Provider cannot be found. it may not be properly installed" although everything seems to be fine, please any ideas on how to go about it.

    Code:
    Sub ConnectLocally()
        Dim conData As New ADODB.Connection
        Dim rstAssigns As New ADODB.Recordset
        Dim intCount As Integer
        Dim strSelect As String
        Dim strResults As String
        fhre = ActiveDocument.Path
        part = fhre & "\timetrack.mpp"
        
        
        conData.ConnectionString = "Provider=Microsoft.Project.OLEDB.9.0;PROJECT NAME=" & part
        conData.ConnectionTimeout = 30
        conData.Open
    
        strSelect = "SELECT ResourceUniqueID, AssignmentResourceID, AssignmentResourceName , TaskUniqueID, AssignmentTaskID, " & _
             " AssignmentTaskName FROM Assignments WHERE TaskUniqueID > 0 ORDER BY AssignmentTaskID ASC"
        rstAssigns.Open strSelect, conData
    
        Do While Not rstAssigns.EOF
            For intCount = 0 To rstAssigns.Fields.Count - 1
                strResults = strResults & "'" & _
                rstAssigns.Fields(intCount).Name & "'" & _
                    Space(30 - Len(rstAssigns.Fields(intCount).Name)) & vbTab & CStr(rstAssigns.Fields(intCount).Value) & vbCrLf
            Next
            strResults = strResults & vbCrLf
            rstAssigns.MoveNext
        Loop
        
        conData.Close
        
        Open "C:\My Documents\Results.txt" For Output As #1
        Print #1, strResults
        Close #1
            
        Shell "Notepad C:\My Documents\Results.txt", vbMaximizedFocus
    
    End Sub
    PS: i added the Ms project library reference and also the ADO 2.6 library reference

    i appreciate your suggestions.

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Won't be able to really check this without the working file. However, from an initial look, why don't you try this..

    Code:
    Sub ConnectLocally()
        Dim conData As Object 'New ADODB.Connection
        Dim rstAssigns As Object 'New ADODB.Recordset
        Dim intCount As Integer
        Dim strSelect As String
        Dim strResults As String
        fhre = ActiveDocument.Path
        part = fhre & "\timetrack.mpp"
        
        Set conData = CreateObject("ADODB.Connection")
        Set rstAssigns = CreateObject("ADODB.RecordSet")
        conData.ConnectionString = "Provider=Microsoft.Project.OLEDB.10.0;PROJECT NAME=" & part
        conData.ConnectionTimeout = 30
        conData.Open
    
        strSelect = "SELECT ResourceUniqueID, AssignmentResourceID, AssignmentResourceName , TaskUniqueID, AssignmentTaskID, " & _
             " AssignmentTaskName FROM Assignments WHERE TaskUniqueID > 0 ORDER BY AssignmentTaskID ASC"
        rstAssigns.Open strSelect, conData
    
        Do While Not rstAssigns.EOF
            For intCount = 0 To rstAssigns.Fields.Count - 1
                strResults = strResults & "'" & _
                rstAssigns.Fields(intCount).Name & "'" & _
                    Space(30 - Len(rstAssigns.Fields(intCount).Name)) & vbTab & CStr(rstAssigns.Fields(intCount).Value) & vbCrLf
            Next
            strResults = strResults & vbCrLf
            rstAssigns.MoveNext
        Loop
        
        conData.Close
        
        Open "C:\My Documents\Results.txt" For Output As #1
        Print #1, strResults
        Close #1
            
        Shell "Notepad C:\My Documents\Results.txt", vbMaximizedFocus
    
    End Sub
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Try using OLEDB.11.0 or OLEDB.12.0 also if you are using 2003 or 2007
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  4. #4
    Junior Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0
    Thank you very much Excel fox but it still gives the same error...


    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://www.youtube.com/watch?v=jTmVtPHtiTg&lc=Ugy_RiNN_kAqUvZ8W994AaABAg
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNsaS3Lp1
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgR1EPUkhw
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNe_XC-jK
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgNPOdiDuv
    https://www.youtube.com/watch?v=QjEWAJ3d-jw&lc=UgxJLVpwY8fIla7G-pN4AaABAg.9BLeCWVhxdG9wgN7AC7wAc
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm 9wlhQrYJP3M
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg
    https://www.youtube.com/watch?v=DVFFApHzYVk&lc=Ugyi578yhj9zShmhuPl4AaABAg
    https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgxvxlnuTRWiV6MUZB14AaABAg
    https://www.youtube.com/watch?v=_8i1fVEi5WY&lc=Ugz0ptwE5J-2CpX4Lzh4AaABAg
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxoHAw8RwR7VmyVBUt4AaABAg. 9C-br0lEl8V9xI0_6pCaR9
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=Ugz5DDCMqmHLeEjUU8t4AaABAg. 9bl7m03Onql9xI-ar3Z0ME
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgxYnpd9leriPmc8rPd4AaABAg. 9gdrYDocLIm9xI-2ZpVF-q
    https://www.youtube.com/watch?v=0ltJS7uHfK4&lc=UgyjoPLjNeIAOMVH_u94AaABAg. 9id_Q3FO8Lp9xHyeYSuv1I
    https://www.reddit.com/r/windowsxp/comments/pexq9q/comment/k81ybvj/?utm_source=reddit&utm_medium=web2x&context=3
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgxYgiEZuS9I3xkjJv54AaABAg
    https://www.youtube.com/watch?v=bs-urI_o8jo&lc=UgyBACXgNY4j_cHgH5J4AaABAg.9oTkVdzfqfm 9wlhQrYJP3M
    ttps://www.youtube.com/watch?v=LP9fz2DCMBE
    https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg
    https://www.youtube.com/watch?v=LP9fz2DCMBE&lc=UgzbPgJUMCztIOQDym14AaABAg. 9wdo_rWgxSH9wdpcYqrvp8
    ttps://www.youtube.com/watch?v=bFxnXH4-L1A
    https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxuODisjo6cvom7O-B4AaABAg.9w_AeS3JiK09wdi2XviwLG
    https://www.youtube.com/watch?v=bFxnXH4-L1A&lc=UgxBU39bTptFznDC1PJ4AaABAg
    ttps://www.youtube.com/watch?v=GqzeFYWjTxI
    https://www.youtube.com/watch?v=GqzeFYWjTxI&lc=UgwJnJDJ5JT8hFvibt14AaABAg
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Last edited by DocAElstein; 11-30-2023 at 03:04 PM.

  5. #5
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Can't say much without the file. If it isn't strictly confidential, would you be able to share it on a file share site and post the link here? If it is confidential, why don't you strip down the data and post a sample data file.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  6. #6
    Junior Member
    Join Date
    Sep 2012
    Posts
    9
    Rep Power
    0
    okay i already attached the ms project file
    Thanks i appreciate your help.
    Attached Files Attached Files

  7. #7

Similar Threads

  1. LookUp Value and Concatenate All Found Results
    By Rick Rothstein in forum Rick Rothstein's Corner
    Replies: 48
    Last Post: 10-31-2019, 07:00 AM
  2. Replies: 5
    Last Post: 06-04-2013, 01:04 PM
  3. Replies: 2
    Last Post: 05-14-2013, 01:02 AM
  4. Excel found unreadable content
    By zyousafi in forum Excel Help
    Replies: 2
    Last Post: 08-08-2012, 10:41 AM

Posting Permissions

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