CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10
  1. #1
    Join Date
    Aug 2011
    Posts
    6

    Data Environment SP6?????

    OK, I have fully working compiled VB6 (SP6) program.

    Try to run on other computers, XP and Windows7 results in error 13.
    Install VB6 on other computers same error.
    Install VB6 SP6 and program works perfect.

    The error occurs:

    DataEnvironment1.Connection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & My_Docs & "Test\001.mdb"


    This has been driving me mad for over a week.

    Any help greatly appreciated.

    Pam.

  2. #2
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Data Environment SP6?????

    Sounds like the path you are referencing does not exist on the target machine.

    What is the value of My_Docs when the error occurs?
    Always use [code][/code] tags when posting code.

  3. #3
    Join Date
    Aug 2011
    Posts
    6

    Re: Data Environment SP6?????

    Quote Originally Posted by DataMiser View Post
    Sounds like the path you are referencing does not exist on the target machine.

    What is the value of My_Docs when the error occurs?
    No, path is OK.

  4. #4
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Data Environment SP6?????

    I'll ask again what is the value of My_Docs when the error occurs?

    btw are you sure that is the line that is generating the error? Error 13= Type Mismatch which indicates you have tried to use the wrong type of variable in a given operation but I see nothing on that line which could trigger such and error assuming My_Docs is a string variable.
    Always use [code][/code] tags when posting code.

  5. #5
    Join Date
    Aug 2011
    Posts
    6

    Re: Data Environment SP6?????

    Quote Originally Posted by DataMiser View Post
    I'll ask again what is the value of My_Docs when the error occurs?

    btw are you sure that is the line that is generating the error? Error 13= Type Mismatch which indicates you have tried to use the wrong type of variable in a given operation but I see nothing on that line which could trigger such and error assuming My_Docs is a string variable.
    The path is OK.
    A proceeding line:
    If DataEnvironment1.Connection1.State = adStateOpen Then
    Will give the same error

    I suspect SP6 is updating a data access component.
    I can't work out which.

  6. #6
    Join Date
    Jul 2008
    Location
    WV
    Posts
    5,362

    Re: Data Environment SP6?????

    Have you tried updating MDAC on the target system?
    Always use [code][/code] tags when posting code.

  7. #7
    Join Date
    Aug 2011
    Posts
    6

    Re: Data Environment SP6?????

    Quote Originally Posted by DataMiser View Post
    Have you tried updating MDAC on the target system?
    Yes.
    'Setup does not support installing on this operating system'

  8. #8
    Join Date
    Aug 2011
    Posts
    6

    Re: Data Environment SP6?????

    I have two instances of Microsoft Data Report Designer in Project References:

    Both located C:\Windows\SysWOW64\

    --------------
    MSDBRPTR.DLL
    Microsoft Data Report Runtime DLL - Version 6.0(SP4)
    Version 6.1.97.82
    315KB
    --------------
    MSDBRPT.DLL
    Microsoft Data Report Active X Designer DLL - Version 6.0(SP4)
    Version 6.1.97.82
    327KB
    --------------

    What's all that about then?

  9. #9
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: Data Environment SP6?????

    MDAC is a component. Not those files.

    Look here for more info:
    http://www.connectionstrings.com/access
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  10. #10
    Join Date
    Aug 2011
    Posts
    6

    Talking Re: Data Environment SP6?????

    After a week of pulling my hair out, may be sorted.
    More testing required, however:

    This works (tested on 1 other puter):

    DataEnvironment1.Connections(1).ConnectionString = blahblahblahblah




    This givers error 13:
    DataEnvironment1.Connection1.ConnectionString = blahblahblahblah



    I only have one DataEnvironment named DataEnvironment1

    Thanks to all who tried to help.
    Will post if confirmed resolved!

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured