Setup file for VB project having ADODC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Neelesh2007
    New Member
    • Oct 2007
    • 41

    Setup file for VB project having ADODC

    Hi All,
    I have developed project in VB6.0 with access as backend.I have used ADODC control in VB to retrieve data from access. I have created the Setup file by Package & Deployment. Now when i install the software on other PC whole program works fine but ADODC can not establish connection with database. Then if I install VB6.0 then only ADODC works. Can any body guide me how can i create set-up file so that i can install my software without installing VB. Thanks
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    Take care to include all the .DLL and .OCX files in the setup.

    Comment

    • Neelesh2007
      New Member
      • Oct 2007
      • 41

      #3
      Hello Debasis
      I m including all the .dll & .ocx files that are listed in 'Included files " list in package & deploy wizard. Please tell me which other files should i include?
      Thanks

      Comment

      • Neelesh2007
        New Member
        • Oct 2007
        • 41

        #4
        I am reposting my question. Pl. Help me to solve my problem.
        Thanks

        Comment

        • AHMEDYO
          New Member
          • Nov 2007
          • 112

          #5
          hi

          i think that almost package and development tools dont registry activeX Components & Dll it just copy it, i cant remmember but u can check, if it dont registry u must registry it.

          Comment

          • lotus18
            Contributor
            • Nov 2007
            • 865

            #6
            Hi Neelesh2007

            Why don't you try to change your adodc connection properties using .udl file?

            Comment

            • Neelesh2007
              New Member
              • Oct 2007
              • 41

              #7
              hello Ahemedyo,
              how can i registry activex?
              Hello lotus18
              can i change adodc connection properties using .udl file?

              Pl. tell me

              Thnaks to you both

              Comment

              • AHMEDYO
                New Member
                • Nov 2007
                • 112

                #8
                Hi...

                you can use Regsvr32.exe /s ["yourfile.d ll" or "yourfile.o cx"] , if you just will test by your hand type it in run

                if you wanna to make it with your application you have two methods

                method 1:

                [CODE=vb]Shell "Regsvr32.e xe /s MyFile.dll", vbHide[/CODE]

                care in your mind if your file path have any space you must place it within double quote """" & FilePath & """"
                '============== =============== =============== =============se cond method:

                [CODE=vb]
                Private Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibrar yA" (ByVal lpLibFileName As String) As Long
                Private Declare Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long
                Private Declare Function RegistryCOM Lib "user32" Alias "CallWindowProc A" (ByVal lpPrevWndFunc As Long, ByVal hWnd As Long, ByVal Msg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
                Private Declare Function FreeLibrary Lib "kernel32" (ByVal hLibModule As Long) As Long


                Public Function RegistryFile(By Val FilePath As String) As Integer
                Dim LibraryHandle As Long
                Dim RegistryFunctio nAddress As Long
                LibraryHandle = LoadLibrary(Fil ePath)
                If (LibraryHandle = 0) Then RegistryFile = 1: Exit Function
                RegistryFunctio nAddress = GetProcAddress( LibraryHandle, "DllRegisterSer ver")
                If (RegistryFuncti onAddress = 0) Then Call FreeLibrary(Lib raryHandle): RegistryFile = 2: Exit Function
                Call RegistryCOM(Reg istryFunctionAd dress, 0&, 0&, 0&, 0&)
                Call FreeLibrary(Lib raryHandle)
                End Function[/CODE]

                GOOD LUCK

                Comment

                • Neelesh2007
                  New Member
                  • Oct 2007
                  • 41

                  #9
                  Thanks Ahmedyo
                  But pls tell me at what stage should i register? I think after diploying setup file. Am i correct? And if i want to use 1st method for registering should i repeat the command for registering each .ocx and .dll one by one? Please reply.
                  I hope registry will solve my problem.
                  Thank you very much.

                  Comment

                  • AHMEDYO
                    New Member
                    • Nov 2007
                    • 112

                    #10
                    Hi ...

                    yas man you must registry each file after copy it,this rule with all method that i was descript, copy file and then registry, but i recommend you to try it using hand first from command line, because if the problem is not to registry the file then you wast ur time in setup application

                    Best Regards

                    Comment

                    Working...